From cff23616fe45e10c6786a303c8dcfc0a80463a53 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 29 Aug 2006 22:44:09 +0300 Subject: [PATCH 01/17] configure.ac: allow disabling of XSDL --- configure.ac | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index da3e55d09..bbff3875c 100644 --- a/configure.ac +++ b/configure.ac @@ -1416,7 +1416,6 @@ AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes]) dnl kdrive DDX -dnl utterly incomplete yet XEYPHR_LIBS= XEPHYR_INCS= @@ -1463,6 +1462,9 @@ if test "$KDRIVE" = yes; then # check for SDL SDK AC_CHECK_HEADERS([SDL/SDL.h]) + if test "x$XSDL" = xauto; then + XSDL="$ac_cv_header_SDL_SDL_h" + fi fi AC_SUBST(KDRIVE_INCS) AC_SUBST(KDRIVE_PURE_INCS) @@ -1473,8 +1475,6 @@ AM_CONDITIONAL(TSLIB, false) AM_CONDITIONAL(H3600_TS, false) AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes]) AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes]) -#AM_CONDITIONAL(KDRIVEVESA, false) -#AM_CONDITIONAL(KDRIVEFBDEV, false) # Xephyr needs nanosleep() which is in librt on Solaris AC_CHECK_FUNC([nanosleep], [], @@ -1485,13 +1485,12 @@ XEPHYR_LIBS="$XEPHYR_LIBS $XSERVER_LIBS" AC_SUBST([XEPHYR_LIBS]) AC_SUBST([XEPHYR_INCS]) -AM_CONDITIONAL(XSDLSERVER, [test x"$ac_cv_header_SDL_SDL_h" = xyes]) -if test x"$ac_cv_header_SDL_SDL_h" = xyes -o x"$XSDL" = xyes; then - # PKG_CHECK_MODULES(XSDL_EXTRA, Xfont xau $XDMCP_MODULES) +if test x"$XSDL" = xyes; then AC_DEFINE(XSDLSERVER,,[Build Xsdl server]) XSDL_LIBS="`sdl-config --libs` $XSERVER_LIBS" XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS" fi +AM_CONDITIONAL(XSDLSERVER, [test x"$XSDL" = xyes]) AC_SUBST([XSDL_LIBS]) AC_SUBST([XSDL_INCS]) From 393dc0a3388d56186181b2bd9bcc1d267747e709 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 29 Aug 2006 22:53:54 +0300 Subject: [PATCH 02/17] kdrive: remove @KDRIVE_LIBS@ from Xfoo_DEPENDENCIES --- hw/kdrive/chips/Makefile.am | 2 +- hw/kdrive/ephyr/Makefile.am | 4 +--- hw/kdrive/epson/Makefile.am | 2 +- hw/kdrive/fake/Makefile.am | 4 +--- hw/kdrive/fbdev/Makefile.am | 4 +--- hw/kdrive/i810/Makefile.am | 2 +- hw/kdrive/mach64/Makefile.am | 2 +- hw/kdrive/mga/Makefile.am | 2 +- hw/kdrive/neomagic/Makefile.am | 2 +- hw/kdrive/nvidia/Makefile.am | 2 +- hw/kdrive/pm2/Makefile.am | 2 +- hw/kdrive/r128/Makefile.am | 2 +- hw/kdrive/sdl/Makefile.am | 2 -- hw/kdrive/sis300/Makefile.am | 2 +- hw/kdrive/smi/Makefile.am | 2 +- hw/kdrive/vesa/Makefile.am | 3 +-- hw/kdrive/via/Makefile.am | 2 +- 17 files changed, 16 insertions(+), 25 deletions(-) diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am index e3080774b..4966faeed 100644 --- a/hw/kdrive/chips/Makefile.am +++ b/hw/kdrive/chips/Makefile.am @@ -30,4 +30,4 @@ Xchips_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xchips_DEPENDENCIES = $(CHIPS_LIBS) @KDRIVE_LIBS@ +Xchips_DEPENDENCIES = $(CHIPS_LIBS) diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am index f423bfe40..1c65944b9 100644 --- a/hw/kdrive/ephyr/Makefile.am +++ b/hw/kdrive/ephyr/Makefile.am @@ -39,6 +39,4 @@ Xephyr_LDADD = \ Xephyr_DEPENDENCIES = \ libxephyr.a \ - libxephyr-hostx.a \ - @KDRIVE_LIBS@ \ - ../../../exa/libexa.la + libxephyr-hostx.a diff --git a/hw/kdrive/epson/Makefile.am b/hw/kdrive/epson/Makefile.am index 0538f4c39..97b0a75b3 100644 --- a/hw/kdrive/epson/Makefile.am +++ b/hw/kdrive/epson/Makefile.am @@ -30,4 +30,4 @@ Xepson_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xepson_DEPENDENCIES = $(EPSON_LIBS) @KDRIVE_LIBS@ +Xepson_DEPENDENCIES = $(EPSON_LIBS) diff --git a/hw/kdrive/fake/Makefile.am b/hw/kdrive/fake/Makefile.am index f3a6a3453..3a53e3dbb 100644 --- a/hw/kdrive/fake/Makefile.am +++ b/hw/kdrive/fake/Makefile.am @@ -28,6 +28,4 @@ Xfake_LDADD = \ @XSERVER_LIBS@ Xfake_DEPENDENCIES = \ - libfake.a \ - @KDRIVE_LIBS@ - + libfake.a diff --git a/hw/kdrive/fbdev/Makefile.am b/hw/kdrive/fbdev/Makefile.am index fce6df9f4..92464f4e8 100644 --- a/hw/kdrive/fbdev/Makefile.am +++ b/hw/kdrive/fbdev/Makefile.am @@ -24,6 +24,4 @@ Xfbdev_LDADD = \ $(TSLIB_FLAG) Xfbdev_DEPENDENCIES = \ - libfbdev.a \ - @KDRIVE_LIBS@ - + libfbdev.a diff --git a/hw/kdrive/i810/Makefile.am b/hw/kdrive/i810/Makefile.am index d676a6902..a611829a3 100644 --- a/hw/kdrive/i810/Makefile.am +++ b/hw/kdrive/i810/Makefile.am @@ -32,4 +32,4 @@ Xi810_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xi810_DEPENDENCIES = $(I810_LIBS) @KDRIVE_LIBS@ +Xi810_DEPENDENCIES = $(I810_LIBS) diff --git a/hw/kdrive/mach64/Makefile.am b/hw/kdrive/mach64/Makefile.am index 299565fdb..e924aef71 100644 --- a/hw/kdrive/mach64/Makefile.am +++ b/hw/kdrive/mach64/Makefile.am @@ -34,4 +34,4 @@ Xmach64_LDADD = \ $(TSLIB_FLAG) -Xmach64_DEPENDENCIES = $(MACH64_LIBS) @KDRIVE_LIBS@ +Xmach64_DEPENDENCIES = $(MACH64_LIBS) diff --git a/hw/kdrive/mga/Makefile.am b/hw/kdrive/mga/Makefile.am index 64d260ede..00b8c56e9 100644 --- a/hw/kdrive/mga/Makefile.am +++ b/hw/kdrive/mga/Makefile.am @@ -32,4 +32,4 @@ Xmga_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xmga_DEPENDENCIES = $(MGA_LIBS) @KDRIVE_LIBS@ +Xmga_DEPENDENCIES = $(MGA_LIBS) diff --git a/hw/kdrive/neomagic/Makefile.am b/hw/kdrive/neomagic/Makefile.am index b37bfc303..75fd4ed7b 100644 --- a/hw/kdrive/neomagic/Makefile.am +++ b/hw/kdrive/neomagic/Makefile.am @@ -44,4 +44,4 @@ Xneomagic_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xneomagic_DEPENDENCIES = $(NEOMAGIC_LIBS) @KDRIVE_LIBS@ +Xneomagic_DEPENDENCIES = $(NEOMAGIC_LIBS) diff --git a/hw/kdrive/nvidia/Makefile.am b/hw/kdrive/nvidia/Makefile.am index 48551a3a6..3c31a9842 100644 --- a/hw/kdrive/nvidia/Makefile.am +++ b/hw/kdrive/nvidia/Makefile.am @@ -33,4 +33,4 @@ Xnvidia_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xnvidia_DEPENDENCIES = $(NVIDIA_LIBS) @KDRIVE_LIBS@ +Xnvidia_DEPENDENCIES = $(NVIDIA_LIBS) diff --git a/hw/kdrive/pm2/Makefile.am b/hw/kdrive/pm2/Makefile.am index 1a712072a..4c41c65e8 100644 --- a/hw/kdrive/pm2/Makefile.am +++ b/hw/kdrive/pm2/Makefile.am @@ -31,4 +31,4 @@ Xpm2_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xpm2_DEPENDENCIES = $(PM2_LIBS) @KDRIVE_LIBS@ +Xpm2_DEPENDENCIES = $(PM2_LIBS) diff --git a/hw/kdrive/r128/Makefile.am b/hw/kdrive/r128/Makefile.am index b33e138e1..d68e155f4 100644 --- a/hw/kdrive/r128/Makefile.am +++ b/hw/kdrive/r128/Makefile.am @@ -30,4 +30,4 @@ Xr128_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xr128_DEPENDENCIES = $(R128_LIBS) @KDRIVE_LIBS@ +Xr128_DEPENDENCIES = $(R128_LIBS) diff --git a/hw/kdrive/sdl/Makefile.am b/hw/kdrive/sdl/Makefile.am index ba6ed4d4a..cc3873ca8 100644 --- a/hw/kdrive/sdl/Makefile.am +++ b/hw/kdrive/sdl/Makefile.am @@ -16,5 +16,3 @@ Xsdl_LDADD = @KDRIVE_PURE_LIBS@ \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) \ @XSDL_LIBS@ - -Xsdl_DEPENDENCIES = @KDRIVE_LIBS@ diff --git a/hw/kdrive/sis300/Makefile.am b/hw/kdrive/sis300/Makefile.am index efd1e9ab4..6a6e0bf80 100644 --- a/hw/kdrive/sis300/Makefile.am +++ b/hw/kdrive/sis300/Makefile.am @@ -43,4 +43,4 @@ Xsis_LDADD = \ @KDRIVE_LIBS@ \ $(TSLIB_FLAG) -Xsis_DEPENDENCIES = $(SIS_LIBS) @KDRIVE_LIBS@ +Xsis_DEPENDENCIES = $(SIS_LIBS) diff --git a/hw/kdrive/smi/Makefile.am b/hw/kdrive/smi/Makefile.am index a214e762e..f7f0a6675 100644 --- a/hw/kdrive/smi/Makefile.am +++ b/hw/kdrive/smi/Makefile.am @@ -35,4 +35,4 @@ Xsmi_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xsmi_DEPENDENCIES = $(SMI_LIBS) @KDRIVE_LIBS@ +Xsmi_DEPENDENCIES = $(SMI_LIBS) diff --git a/hw/kdrive/vesa/Makefile.am b/hw/kdrive/vesa/Makefile.am index 01bc0a3e1..c490205b0 100644 --- a/hw/kdrive/vesa/Makefile.am +++ b/hw/kdrive/vesa/Makefile.am @@ -32,5 +32,4 @@ Xvesa_LDADD = \ @XSERVER_LIBS@ Xvesa_DEPENDENCIES = \ - libvesa.a \ - @KDRIVE_LIBS@ + libvesa.a diff --git a/hw/kdrive/via/Makefile.am b/hw/kdrive/via/Makefile.am index 4d52df9b1..7dcfd7c5b 100644 --- a/hw/kdrive/via/Makefile.am +++ b/hw/kdrive/via/Makefile.am @@ -31,4 +31,4 @@ Xvia_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xvia_DEPENDENCIES = $(VIA_LIBS) @KDRIVE_LIBS@ +Xvia_DEPENDENCIES = $(VIA_LIBS) From 77d315bd2fd2f9014c831d313efbe5821189177c Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 29 Aug 2006 13:30:20 -0700 Subject: [PATCH 03/17] Remove __glXNoSuchRenderOpcode because it is no longer used. --- GL/glx/glxext.c | 6 ------ GL/glx/glxext.h | 1 - 2 files changed, 7 deletions(-) diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c index 5600d175d..fdb8ea262 100644 --- a/GL/glx/glxext.c +++ b/GL/glx/glxext.c @@ -514,9 +514,3 @@ static int __glXDispatch(ClientPtr client) return retval; } - -void __glXNoSuchRenderOpcode(GLbyte *pc) -{ - return; -} - diff --git a/GL/glx/glxext.h b/GL/glx/glxext.h index c494de4a0..d7082086b 100644 --- a/GL/glx/glxext.h +++ b/GL/glx/glxext.h @@ -66,7 +66,6 @@ typedef struct { extern GLboolean __glXFreeContext(__GLXcontext *glxc); extern void __glXFlushContextCache(void); -extern void __glXNoSuchRenderOpcode(GLbyte*); extern void __glXErrorCallBack(__GLinterface *gc, GLenum code); extern void __glXClearErrorOccured(void); extern GLboolean __glXErrorOccured(void); From 5ddbf4bcd46fe0d3d682668c2748c712fea410ae Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Tue, 29 Aug 2006 22:07:15 +0100 Subject: [PATCH 04/17] Re-add support for tslib (1.0 release) and Xcalibrate extension. --- Xext/Makefile.am | 7 + Xext/xcalibrate.c | 262 +++++++++++++++++++++++++++++++++ configure.ac | 23 ++- hw/kdrive/ati/Makefile.am | 14 +- hw/kdrive/chips/Makefile.am | 17 +-- hw/kdrive/ephyr/Makefile.am | 6 - hw/kdrive/epson/Makefile.am | 11 +- hw/kdrive/fbdev/Makefile.am | 7 +- hw/kdrive/i810/Makefile.am | 8 +- hw/kdrive/mga/Makefile.am | 4 +- hw/kdrive/neomagic/Makefile.am | 13 +- hw/kdrive/nvidia/Makefile.am | 7 +- hw/kdrive/pm2/Makefile.am | 12 +- hw/kdrive/r128/Makefile.am | 12 +- hw/kdrive/smi/Makefile.am | 13 +- hw/kdrive/vesa/Makefile.am | 6 - 16 files changed, 338 insertions(+), 84 deletions(-) create mode 100644 Xext/xcalibrate.c diff --git a/Xext/Makefile.am b/Xext/Makefile.am index ad3f98edf..3a48109bc 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -75,6 +75,12 @@ SERVERCONFIG_DATA = SecurityPolicy AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\" endif +XCALIBRATE_SRCS = xcalibrate.c +if XCALIBRATE +BUILTIN_SRCS += $(XCALIBRATE_SRCS) +# XCalibrare needs tslib +endif + # X EVent Interception Extension: allows accessibility helpers & composite # managers to intercept events from input devices and transform as needed # before the clients see them. @@ -150,6 +156,7 @@ EXTRA_DIST = \ $(RES_SRCS) \ $(SCREENSAVER_SRCS) \ $(XCSECURITY_SRCS) \ + $(XCALIBRATE_SRCS) \ $(XINERAMA_SRCS) \ $(XEVIE_SRCS) \ $(XPRINT_SRCS) \ diff --git a/Xext/xcalibrate.c b/Xext/xcalibrate.c new file mode 100644 index 000000000..e273c5313 --- /dev/null +++ b/Xext/xcalibrate.c @@ -0,0 +1,262 @@ +/* + * $Id: xcalibrate.c,v 3.1 2004/06/02 20:49:50 pb Exp $ + * + * Copyright © 2003 Philip Blundell + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Philip Blundell not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Philip Blundell makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_KDRIVE_CONFIG_H +#include +#endif + +#define NEED_EVENTS +#define NEED_REPLIES + +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "swaprep.h" + +#include +#include + +extern void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure); +extern void *tslib_raw_event_closure; + +static CARD8 XCalibrateReqCode; +int XCalibrateEventBase; +int XCalibrateReqBase; +int XCalibrateErrorBase; + +static ClientPtr xcalibrate_client; + +static void +xcalibrate_event_hook (int x, int y, int pressure, void *closure) +{ + ClientPtr pClient = (ClientPtr) closure; + xXCalibrateRawTouchscreenEvent ev; + + ev.type = XCalibrateEventBase + X_XCalibrateRawTouchscreen; + ev.sequenceNumber = pClient->sequence; + ev.x = x; + ev.y = y; + ev.pressure = pressure; + + if (!pClient->clientGone) + WriteEventsToClient (pClient, 1, (xEvent *) &ev); +} + +static int +ProcXCalibrateQueryVersion (ClientPtr client) +{ + REQUEST(xXCalibrateQueryVersionReq); + xXCalibrateQueryVersionReply rep; + CARD16 client_major, client_minor; /* not used */ + + REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq); + + client_major = stuff->majorVersion; + client_minor = stuff->minorVersion; + + fprintf(stderr, "%s(): called\n", __func__); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = XCALIBRATE_MAJOR_VERSION; + rep.minorVersion = XCALIBRATE_MINOR_VERSION; + if (client->swapped) { + int n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + } + WriteToClient(client, sizeof (xXCalibrateQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + +static int +SProcXCalibrateQueryVersion (ClientPtr client) +{ + REQUEST(xXCalibrateQueryVersionReq); + int n; + + REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq); + swaps(&stuff->majorVersion,n); + swaps(&stuff->minorVersion,n); + return ProcXCalibrateQueryVersion(client); +} + +static int +ProcXCalibrateSetRawMode (ClientPtr client) +{ + REQUEST(xXCalibrateRawModeReq); + xXCalibrateRawModeReply rep; + + REQUEST_SIZE_MATCH (xXCalibrateRawModeReq); + + memset (&rep, 0, sizeof (rep)); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + + if (stuff->on) + { + if (xcalibrate_client == NULL) + { + /* Start calibrating. */ + xcalibrate_client = client; + tslib_raw_event_hook = xcalibrate_event_hook; + tslib_raw_event_closure = client; + rep.status = GrabSuccess; + } + else + { + rep.status = AlreadyGrabbed; + } + } + else + { + if (xcalibrate_client == client) + { + /* Stop calibrating. */ + xcalibrate_client = NULL; + tslib_raw_event_hook = NULL; + tslib_raw_event_closure = NULL; + rep.status = GrabSuccess; + + /* Cycle input off and on to reload configuration. */ + KdDisableInput (); + KdEnableInput (); + } + else + { + rep.status = AlreadyGrabbed; + } + } + + if (client->swapped) + { + int n; + + swaps (&rep.sequenceNumber, n); + swaps (&rep.status, n); + } + WriteToClient(client, sizeof (rep), (char *) &rep); + return (client->noClientException); +} + + +static int +SProcXCalibrateSetRawMode (ClientPtr client) +{ + REQUEST(xXCalibrateRawModeReq); + int n; + + REQUEST_SIZE_MATCH (xXCalibrateRawModeReq); + + swaps(&stuff->on, n); + + return ProcXCalibrateSetRawMode(client); +} + +static void +XCalibrateResetProc (ExtensionEntry *extEntry) +{ +} + +static int +ProcXCalibrateDispatch (ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_XCalibrateQueryVersion: + return ProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return ProcXCalibrateSetRawMode(client); + default: break; + } + + return BadRequest; +} + +static int +SProcXCalibrateDispatch (ClientPtr client) +{ + REQUEST(xReq); + int n; + + swaps(&stuff->length,n); + + switch (stuff->data) { + case X_XCalibrateQueryVersion: + return SProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return SProcXCalibrateSetRawMode(client); + + default: break; + } + + return BadRequest; +} + +static void +XCalibrateClientCallback (CallbackListPtr *list, + pointer closure, + pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + + if (clientinfo->setup == NULL + && xcalibrate_client != NULL + && xcalibrate_client == pClient) + { + /* Stop calibrating. */ + xcalibrate_client = NULL; + tslib_raw_event_hook = NULL; + tslib_raw_event_closure = NULL; + } +} + +void +XCalibrateExtensionInit(void) +{ + ExtensionEntry *extEntry; + + if (!AddCallback (&ClientStateCallback, XCalibrateClientCallback, 0)) + return; + + extEntry = AddExtension(XCALIBRATE_NAME, XCalibrateNumberEvents, XCalibrateNumberErrors, + ProcXCalibrateDispatch, SProcXCalibrateDispatch, + XCalibrateResetProc, StandardMinorOpcode); + + if (!extEntry) + return; + + XCalibrateReqCode = (unsigned char)extEntry->base; + XCalibrateEventBase = extEntry->eventBase; + XCalibrateErrorBase = extEntry->errorBase; + + xcalibrate_client = 0; +} diff --git a/configure.ac b/configure.ac index bbff3875c..798c8f0da 100644 --- a/configure.ac +++ b/configure.ac @@ -414,6 +414,8 @@ AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinera AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes]) AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes]) AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=yes]) +AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) +AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no]) AC_ARG_ENABLE(xevie, AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes]) AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=yes]) AC_ARG_ENABLE(cup, AS_HELP_STRING([--disable-cup], [Build TOG-CUP extension (default: enabled)]), [CUP=$enableval], [CUP=yes]) @@ -696,6 +698,14 @@ if test "x$XPRINT" = xyes; then REQUIRED_MODULES="$REQUIRED_MODULES printproto" fi +if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then + AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension]) + REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" +else + XCALIBRATE=no +fi +AM_CONDITIONAL(XCALIBRATE, [test "x$XCALIBRATE" = xyes]) + AC_DEFINE(RENDER, 1, [Support RENDER extension]) RENDER_LIB='$(top_builddir)/render/librender.la' RENDER_INC='-I$(top_srcdir)/render' @@ -1439,6 +1449,13 @@ if test "$KDRIVE" = yes; then fi # tslib... + if test "x$TSLIB" = xyes; then + PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"]) + if test "x$HAVE_TSLIB" = xno; then + AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/]) + fi + AC_DEFINE(TSLIB, 1, [Have tslib support]) + fi # damage shadow extension glx (NOTYET) fb mi KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' @@ -1446,7 +1463,7 @@ if test "$KDRIVE" = yes; then KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux' KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC" - KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H" + KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS" # dix os fb mi extension glx (NOTYET) damage shadow xpstubs #KDRIVE_PURE_LIBS="$DIX_LIB $OS_LIB $FB_LIB $XEXT_LIB $MIEXT_DAMAGE_LIB \ @@ -1455,7 +1472,7 @@ if test "$KDRIVE" = yes; then KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' - KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB" + KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB $TSLIB_LIBS" # check if we can build Xephyr PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"]) @@ -1471,7 +1488,7 @@ AC_SUBST(KDRIVE_PURE_INCS) AC_SUBST(KDRIVE_CFLAGS) AC_SUBST(KDRIVE_PURE_LIBS) AC_SUBST(KDRIVE_LIBS) -AM_CONDITIONAL(TSLIB, false) +AM_CONDITIONAL(TSLIB, [test "x$HAVE_TSLIB" = xyes]) AM_CONDITIONAL(H3600_TS, false) AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes]) AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes]) diff --git a/hw/kdrive/ati/Makefile.am b/hw/kdrive/ati/Makefile.am index b23418129..3732d7d72 100644 --- a/hw/kdrive/ati/Makefile.am +++ b/hw/kdrive/ati/Makefile.am @@ -31,10 +31,6 @@ INCLUDES = \ bin_PROGRAMS = Xati -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libati.a libati_a_SOURCES = \ @@ -65,8 +61,12 @@ ATI_LIBS = \ Xati_LDADD = \ $(ATI_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ -Xati_DEPENDENCIES = $(ATI_LIBS) +Xati_DEPENDENCIES = \ + libati.a \ + $(FBDEV_LIBS) \ + $(VESA_LIBS) \ + $(DRI_LIBS) + diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am index 4966faeed..80fb2ddea 100644 --- a/hw/kdrive/chips/Makefile.am +++ b/hw/kdrive/chips/Makefile.am @@ -5,10 +5,6 @@ INCLUDES = \ bin_PROGRAMS = Xchips -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libchips.a libchips_a_SOURCES = \ @@ -19,15 +15,16 @@ libchips_a_SOURCES = \ Xchips_SOURCES = \ chipsstub.c -CHIPS_LIBS = \ - libchips.a \ +CHIPS_LIBS = \ + libchips.a \ $(top_builddir)/hw/kdrive/vesa/libvesa.a \ @KDRIVE_LIBS@ Xchips_LDADD = \ $(CHIPS_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @KDRIVE_LIBS@ \ + @XSERVER_LIBS@ -Xchips_DEPENDENCIES = $(CHIPS_LIBS) +Xchips_DEPENDENCIES = \ + libchips.a \ + $(top_builddir)/hw/kdrive/vesa/libvesa.a diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am index 1c65944b9..8f51bbe08 100644 --- a/hw/kdrive/ephyr/Makefile.am +++ b/hw/kdrive/ephyr/Makefile.am @@ -5,11 +5,6 @@ INCLUDES = \ noinst_LIBRARIES = libxephyr.a libxephyr-hostx.a -if TSLIB -TSLIB_LIBS = -lts -endif - - bin_PROGRAMS = Xephyr libxephyr_a_SOURCES = \ @@ -34,7 +29,6 @@ Xephyr_LDADD = \ ../../../exa/libexa.la \ @KDRIVE_LIBS@ \ @KDRIVE_LIBS@ \ - $(TSLIB_LIBS) \ @XEPHYR_LIBS@ Xephyr_DEPENDENCIES = \ diff --git a/hw/kdrive/epson/Makefile.am b/hw/kdrive/epson/Makefile.am index 97b0a75b3..665d13651 100644 --- a/hw/kdrive/epson/Makefile.am +++ b/hw/kdrive/epson/Makefile.am @@ -4,10 +4,6 @@ INCLUDES = \ bin_PROGRAMS = Xepson -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libepson.a libepson_a_SOURCES = \ @@ -25,9 +21,8 @@ EPSON_LIBS = \ @KDRIVE_LIBS@ Xepson_LDADD = \ - $(EPSON_LIBS) \ + $(EPSON_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ -Xepson_DEPENDENCIES = $(EPSON_LIBS) +Xepson_DEPENDENCIES = libepson.a diff --git a/hw/kdrive/fbdev/Makefile.am b/hw/kdrive/fbdev/Makefile.am index 92464f4e8..3a8c65bbb 100644 --- a/hw/kdrive/fbdev/Makefile.am +++ b/hw/kdrive/fbdev/Makefile.am @@ -6,10 +6,6 @@ noinst_LIBRARIES = libfbdev.a bin_PROGRAMS = Xfbdev -if TSLIB -TSLIB_FLAG = -lts -endif - libfbdev_a_SOURCES = \ fbdev.c \ fbdev.h @@ -20,8 +16,7 @@ Xfbdev_SOURCES = \ Xfbdev_LDADD = \ libfbdev.a \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ Xfbdev_DEPENDENCIES = \ libfbdev.a diff --git a/hw/kdrive/i810/Makefile.am b/hw/kdrive/i810/Makefile.am index a611829a3..808d8f70b 100644 --- a/hw/kdrive/i810/Makefile.am +++ b/hw/kdrive/i810/Makefile.am @@ -6,9 +6,6 @@ bin_PROGRAMS = Xi810 noinst_LIBRARIES = libi810.a -if TSLIB -TSLIB_FLAG = -lts -endif libi810_a_SOURCES = \ i810_cursor.c \ @@ -29,7 +26,6 @@ I810_LIBS = \ Xi810_LDADD = \ $(I810_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ -Xi810_DEPENDENCIES = $(I810_LIBS) +Xi810_DEPENDENCIES = libi810.a diff --git a/hw/kdrive/mga/Makefile.am b/hw/kdrive/mga/Makefile.am index 00b8c56e9..d8ebae920 100644 --- a/hw/kdrive/mga/Makefile.am +++ b/hw/kdrive/mga/Makefile.am @@ -32,4 +32,6 @@ Xmga_LDADD = \ @XSERVER_LIBS@ \ $(TSLIB_FLAG) -Xmga_DEPENDENCIES = $(MGA_LIBS) +Xmga_DEPENDENCIES = \ + libmga.a \ + $(top_builddir)/hw/kdrive/vesa/libvesa.a diff --git a/hw/kdrive/neomagic/Makefile.am b/hw/kdrive/neomagic/Makefile.am index 75fd4ed7b..9f8e02919 100644 --- a/hw/kdrive/neomagic/Makefile.am +++ b/hw/kdrive/neomagic/Makefile.am @@ -16,10 +16,6 @@ INCLUDES = \ bin_PROGRAMS = Xneomagic -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libneomagic.a libneomagic_a_SOURCES = \ @@ -41,7 +37,10 @@ NEOMAGIC_LIBS = \ Xneomagic_LDADD = \ $(NEOMAGIC_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ -Xneomagic_DEPENDENCIES = $(NEOMAGIC_LIBS) + +Xneomagic_DEPENDENCIES = \ + libneomagic.a \ + ${FBDEV_LIBS} \ + ${VESA_LIBS} diff --git a/hw/kdrive/nvidia/Makefile.am b/hw/kdrive/nvidia/Makefile.am index 3c31a9842..d7b26cfa1 100644 --- a/hw/kdrive/nvidia/Makefile.am +++ b/hw/kdrive/nvidia/Makefile.am @@ -30,7 +30,8 @@ NVIDIA_LIBS = \ Xnvidia_LDADD = \ $(NVIDIA_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ -Xnvidia_DEPENDENCIES = $(NVIDIA_LIBS) +Xnvidia_DEPENDENCIES = \ + libnvidia.a \ + $(top_builddir)/hw/kdrive/vesa/libvesa.a diff --git a/hw/kdrive/pm2/Makefile.am b/hw/kdrive/pm2/Makefile.am index 4c41c65e8..24ef15042 100644 --- a/hw/kdrive/pm2/Makefile.am +++ b/hw/kdrive/pm2/Makefile.am @@ -5,10 +5,6 @@ INCLUDES = \ bin_PROGRAMS = Xpm2 -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libpm2.a libpm2_a_SOURCES = \ @@ -28,7 +24,9 @@ PM2_LIBS = \ Xpm2_LDADD = \ $(PM2_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ -Xpm2_DEPENDENCIES = $(PM2_LIBS) + +Xpm2_DEPENDENCIES = \ + libpm2.a \ + $(top_builddir)/hw/kdrive/vesa/libvesa.a diff --git a/hw/kdrive/r128/Makefile.am b/hw/kdrive/r128/Makefile.am index d68e155f4..da42af95f 100644 --- a/hw/kdrive/r128/Makefile.am +++ b/hw/kdrive/r128/Makefile.am @@ -5,10 +5,6 @@ INCLUDES = \ bin_PROGRAMS = Xr128 -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libr128.a libr128_a_SOURCES = \ @@ -27,7 +23,9 @@ R128_LIBS = \ Xr128_LDADD = \ $(R128_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ -Xr128_DEPENDENCIES = $(R128_LIBS) + +Xr128_DEPENDENCIES = \ + libr128.a \ + $(top_builddir)/hw/kdrive/vesa/libvesa.a diff --git a/hw/kdrive/smi/Makefile.am b/hw/kdrive/smi/Makefile.am index f7f0a6675..86a9ea947 100644 --- a/hw/kdrive/smi/Makefile.am +++ b/hw/kdrive/smi/Makefile.am @@ -6,10 +6,6 @@ INCLUDES = \ bin_PROGRAMS = Xsmi -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libsmi.a # smivideo.c # not ready yet @@ -32,7 +28,10 @@ SMI_LIBS = \ Xsmi_LDADD = \ $(SMI_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ -Xsmi_DEPENDENCIES = $(SMI_LIBS) + +Xsmi_DEPENDENCIES = \ + libsmi.a \ + $(top_builddir)/hw/kdrive/fbdev/libfbdev.a \ + $(top_builddir)/hw/kdrive/vesa/libvesa.a diff --git a/hw/kdrive/vesa/Makefile.am b/hw/kdrive/vesa/Makefile.am index c490205b0..70ba55fa7 100644 --- a/hw/kdrive/vesa/Makefile.am +++ b/hw/kdrive/vesa/Makefile.am @@ -6,11 +6,6 @@ noinst_LIBRARIES = libvesa.a bin_PROGRAMS = Xvesa -if TSLIB -TSLIB_FLAG = -lts -endif - - libvesa_a_SOURCES = \ vesa.c \ vesa.h \ @@ -28,7 +23,6 @@ Xvesa_LDADD = \ libvesa.a \ @KDRIVE_LIBS@ \ @KDRIVE_LIBS@ \ - $(TSLIB_FLAG) \ @XSERVER_LIBS@ Xvesa_DEPENDENCIES = \ From db6d04d4b87fd9b6409a3ddf0479a88440c2eda1 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 29 Aug 2006 14:35:08 -0700 Subject: [PATCH 05/17] Add support for AIGLX drivers to enable GLX extensions that they support. --- GL/glx/Makefile.am | 4 +- GL/glx/extension_string.c | 166 ++++++++++++++++++++++++++++++++++++++ GL/glx/extension_string.h | 63 +++++++++++++++ GL/glx/glxdri.c | 33 ++++++++ 4 files changed, 265 insertions(+), 1 deletion(-) create mode 100644 GL/glx/extension_string.c create mode 100644 GL/glx/extension_string.h diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 339fbe04e..9bb2b7eff 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -31,7 +31,9 @@ INCLUDES = \ nodist_libglx_la_SOURCES = indirect_size.h libglxdri_la_SOURCES = \ - glxdri.c + glxdri.c \ + extension_string.c \ + extension_string.h libglx_la_SOURCES = \ g_disptab.h \ diff --git a/GL/glx/extension_string.c b/GL/glx/extension_string.c new file mode 100644 index 000000000..e5899d774 --- /dev/null +++ b/GL/glx/extension_string.c @@ -0,0 +1,166 @@ +/* + * (C) Copyright IBM Corporation 2002-2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to 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 + * THE COPYRIGHT HOLDERS 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. + */ + +/** + * \file extension_string.c + * Routines to manage the GLX extension string and GLX version for AIGLX + * drivers. This code is loosely based on src/glx/x11/glxextensions.c from + * Mesa. + * + * \author Ian Romanick + */ + +#include +#include "extension_string.h" + +#define SET_BIT(m,b) (m[ (b) / 8 ] |= (1U << ((b) % 8))) +#define CLR_BIT(m,b) (m[ (b) / 8 ] &= ~(1U << ((b) % 8))) +#define IS_SET(m,b) ((m[ (b) / 8 ] & (1U << ((b) % 8))) != 0) +#define CONCAT(a,b) a ## b +#define GLX(n) "GLX_" # n, 4 + sizeof( # n ) - 1, CONCAT(n,_bit) +#define VER(a,b) a, b +#define Y 1 +#define N 0 +#define EXT_ENABLED(bit,supported) (IS_SET(supported, bit)) + +struct extension_info { + const char * const name; + unsigned name_len; + + unsigned char bit; + + /** + * This is the lowest version of GLX that "requires" this extension. + * For example, GLX 1.3 requires SGIX_fbconfig, SGIX_pbuffer, and + * SGI_make_current_read. If the extension is not required by any known + * version of GLX, use 0, 0. + */ + unsigned char version_major; + unsigned char version_minor; + + /** + * Is driver supported foced by the ABI? + */ + unsigned char driver_support; +}; + +static const struct extension_info known_glx_extensions[] = { +/* GLX_ARB_get_proc_address is implemented on the client. */ + { GLX(ARB_multisample), VER(1,4), Y, }, + + { GLX(EXT_import_context), VER(0,0), Y, }, + { GLX(EXT_texture_from_pixmap), VER(0,0), N, }, + { GLX(EXT_visual_info), VER(0,0), Y, }, + { GLX(EXT_visual_rating), VER(0,0), Y, }, + + { GLX(MESA_copy_sub_buffer), VER(0,0), N, }, + { GLX(OML_swap_method), VER(0,0), Y, }, + { GLX(SGI_make_current_read), VER(1,3), N, }, + { GLX(SGI_swap_control), VER(0,0), N, }, + { GLX(SGI_video_sync), VER(0,0), N, }, + { GLX(SGIS_multisample), VER(0,0), Y, }, + { GLX(SGIX_fbconfig), VER(1,3), Y, }, + { GLX(SGIX_pbuffer), VER(1,3), N, }, + { GLX(SGIX_visual_select_group), VER(0,0), Y, }, + { NULL } +}; + + +/** + * Create a GLX extension string for a set of enable bits. + * + * Creates a GLX extension string for the set of bit in \c enable_bits. This + * string is then stored in \c buffer if buffer is not \c NULL. This allows + * two-pass operation. On the first pass the caller passes \c NULL for + * \c buffer, and the function determines how much space is required to store + * the extension string. The caller allocates the buffer and calls the + * function again. + * + * \param enable_bits Bits representing the enabled extensions. + * \param buffer Buffer to store the extension string. May be \c NULL. + * + * \return + * The number of characters in \c buffer that were written to. If \c buffer + * is \c NULL, this is the size of buffer that must be allocated by the + * caller. + */ +int +__glXGetExtensionString(const unsigned char *enable_bits, char *buffer) +{ + unsigned i; + int length = 0; + + + for (i = 0; known_glx_extensions[i].name != NULL; i++) { + const unsigned bit = known_glx_extensions[i].bit; + const size_t len = known_glx_extensions[i].name_len; + + if (EXT_ENABLED(bit, enable_bits)) { + if (buffer != NULL) { + (void) memcpy(& buffer[length], known_glx_extensions[i].name, + len); + + buffer[length + len + 0] = ' '; + buffer[length + len + 1] = '\0'; + } + + length += len + 1; + } + } + + return length + 1; +} + + +void +__glXEnableExtension(unsigned char *enable_bits, const char *ext) +{ + const size_t ext_name_len = strlen(ext); + unsigned i; + + + for (i = 0; known_glx_extensions[i].name != NULL; i++) { + if ((ext_name_len == known_glx_extensions[i].name_len) + && (memcmp(ext, known_glx_extensions[i].name, ext_name_len) == 0)) { + SET_BIT(enable_bits, known_glx_extensions[i].bit); + break; + } + } +} + + +void +__glXInitExtensionEnableBits(unsigned char *enable_bits) +{ + unsigned i; + + + (void) memset(enable_bits, 0, __GLX_EXT_BYTES); + + for (i = 0; known_glx_extensions[i].name != NULL; i++) { + if (known_glx_extensions[i].driver_support) { + SET_BIT(enable_bits, known_glx_extensions[i].bit); + } + } +} diff --git a/GL/glx/extension_string.h b/GL/glx/extension_string.h new file mode 100644 index 000000000..98e91bc18 --- /dev/null +++ b/GL/glx/extension_string.h @@ -0,0 +1,63 @@ +/* + * (C) Copyright IBM Corporation 2002-2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to 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 + * THE COPYRIGHT HOLDERS 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. + */ + +/** + * \file extension_string.h + * Routines to manage the GLX extension string and GLX version for AIGLX + * drivers. This code is loosely based on src/glx/x11/glxextensions.c from + * Mesa. + * + * \author Ian Romanick + */ + +#ifndef GLX_EXTENSION_STRING_H +#define GLX_EXTENSION_STRING_H + +enum { +/* GLX_ARB_get_proc_address is implemented on the client. */ + ARB_multisample_bit = 0, + EXT_import_context_bit, + EXT_texture_from_pixmap_bit, + EXT_visual_info_bit, + EXT_visual_rating_bit, + MESA_copy_sub_buffer_bit, + OML_swap_method_bit, + SGI_make_current_read_bit, + SGI_swap_control_bit, + SGI_video_sync_bit, + SGIS_multisample_bit, + SGIX_fbconfig_bit, + SGIX_pbuffer_bit, + SGIX_visual_select_group_bit, + __NUM_GLX_EXTS, +}; + +#define __GLX_EXT_BYTES ((__NUM_GLX_EXTS + 7) / 8) + +extern int __glXGetExtensionString(const unsigned char *enable_bits, + char *buffer); +extern void __glXEnableExtension(unsigned char *enable_bits, const char *ext); +extern void __glXInitExtensionEnableBits(unsigned char *enable_bits); + +#endif /* GLX_EXTENSION_STRING_H */ diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index fa7f1ddc8..212f2a80c 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -57,6 +57,7 @@ #include "glapi.h" #include "glthread.h" #include "dispatch.h" +#include "extension_string.h" #define STRINGIFY(macro_or_string) STRINGIFY_ARG (macro_or_string) @@ -71,6 +72,8 @@ struct __GLXDRIscreen { __DRIscreen driScreen; void *driver; + + unsigned char glx_enable_bits[__GLX_EXT_BYTES]; }; struct __GLXDRIcontext { @@ -586,8 +589,21 @@ filter_modes(__GLcontextModes **server_modes, } +static void +enable_glx_extension(void *psc, const char *ext_name) +{ + __GLXDRIscreen * const screen = (__GLXDRIscreen *) psc; + + __glXEnableExtension(screen->glx_enable_bits, ext_name); +} + + static __DRIfuncPtr getProcAddress(const char *proc_name) { + if (strcmp(proc_name, "glxEnableExtension") == 0) { + return (__DRIfuncPtr) enable_glx_extension; + } + return NULL; } @@ -812,6 +828,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) void *dev_priv = NULL; char filename[128]; Bool isCapable; + size_t buffer_size; if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable")) { LogMessage(X_ERROR, "AIGLX: DRI module not loaded\n"); @@ -834,6 +851,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen) screen->base.createDrawable = __glXDRIscreenCreateDrawable; screen->base.pScreen = pScreen; + __glXInitExtensionEnableBits(screen->glx_enable_bits); + screen->driScreen.screenConfigs = screen; + + /* DRI protocol version. */ dri_version.major = XF86DRI_MAJOR_VERSION; dri_version.minor = XF86DRI_MINOR_VERSION; @@ -977,6 +998,18 @@ __glXDRIscreenProbe(ScreenPtr pScreen) __glXScreenInit(&screen->base, pScreen); + buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); + if (buffer_size > 0) { + if (screen->base.GLXextensions != NULL) { + xfree(screen->base.GLXextensions); + } + + screen->base.GLXextensions = xnfalloc(buffer_size); + (void) __glXGetExtensionString(screen->glx_enable_bits, + screen->base.GLXextensions); + } + + filter_modes(&screen->base.modes, driver_modes); _gl_context_modes_destroy(driver_modes); From d59b52fc08f2d80b38993e383e61c3eeb0bb0763 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 29 Aug 2006 14:40:13 -0700 Subject: [PATCH 06/17] Make sure unsupported extensions are disabled. GLX protocol isn't supported for GLX_SGI_swap_control or GLX_SGI_video_sync. Remove them from the list of available extensions until they are supported. --- GL/glx/extension_string.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GL/glx/extension_string.c b/GL/glx/extension_string.c index e5899d774..963b18ab0 100644 --- a/GL/glx/extension_string.c +++ b/GL/glx/extension_string.c @@ -77,8 +77,10 @@ static const struct extension_info known_glx_extensions[] = { { GLX(MESA_copy_sub_buffer), VER(0,0), N, }, { GLX(OML_swap_method), VER(0,0), Y, }, { GLX(SGI_make_current_read), VER(1,3), N, }, +#if 0 /* GLX protocol not yet supported for these. */ { GLX(SGI_swap_control), VER(0,0), N, }, { GLX(SGI_video_sync), VER(0,0), N, }, +#endif { GLX(SGIS_multisample), VER(0,0), Y, }, { GLX(SGIX_fbconfig), VER(1,3), Y, }, { GLX(SGIX_pbuffer), VER(1,3), N, }, From 2fb7b8795a9a36cce61f6449f6ca26ffd1b071f0 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 29 Aug 2006 16:35:32 -0700 Subject: [PATCH 07/17] Minor extension tweaks. GLX_EXT_texture_from_pixmap should always be enabled. GLX_SGI_video_sync is only for direct rendering and should never appear in the server's string. --- GL/glx/extension_string.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/GL/glx/extension_string.c b/GL/glx/extension_string.c index 963b18ab0..8f13963ce 100644 --- a/GL/glx/extension_string.c +++ b/GL/glx/extension_string.c @@ -70,7 +70,7 @@ static const struct extension_info known_glx_extensions[] = { { GLX(ARB_multisample), VER(1,4), Y, }, { GLX(EXT_import_context), VER(0,0), Y, }, - { GLX(EXT_texture_from_pixmap), VER(0,0), N, }, + { GLX(EXT_texture_from_pixmap), VER(0,0), Y, }, { GLX(EXT_visual_info), VER(0,0), Y, }, { GLX(EXT_visual_rating), VER(0,0), Y, }, @@ -79,7 +79,6 @@ static const struct extension_info known_glx_extensions[] = { { GLX(SGI_make_current_read), VER(1,3), N, }, #if 0 /* GLX protocol not yet supported for these. */ { GLX(SGI_swap_control), VER(0,0), N, }, - { GLX(SGI_video_sync), VER(0,0), N, }, #endif { GLX(SGIS_multisample), VER(0,0), Y, }, { GLX(SGIX_fbconfig), VER(1,3), Y, }, From fd609956f27d76ee76ac8623787f0fc8633a5546 Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Thu, 31 Aug 2006 17:18:57 +0100 Subject: [PATCH 08/17] Add framebuffer device command line switch for Xfbdev --- hw/kdrive/fbdev/fbdev.c | 16 +++++++++++----- hw/kdrive/fbdev/fbdev.h | 1 + hw/kdrive/fbdev/fbinit.c | 21 +++++++++++++++++---- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index 86384f0a4..904d5f315 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -38,11 +38,17 @@ fbdevInitialize (KdCardInfo *card, FbdevPriv *priv) { int k; unsigned long off; - if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0 && \ - (priv->fd = open("/dev/fb/0", O_RDWR)) < 0) { - perror("Error opening /dev/fb0"); - return FALSE; - } + + if (fbdevDevicePath == NULL) + fbdevDevicePath = "/dev/fb0"; + + if ((priv->fd = open(fbdevDevicePath, O_RDWR)) < 0) + { + ErrorF("Error opening framebuffer %s: %s\n", + fbdevDevicePath, strerror(errno)); + return FALSE; + } + /* quiet valgrind */ memset (&priv->fix, '\0', sizeof (priv->fix)); if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) { diff --git a/hw/kdrive/fbdev/fbdev.h b/hw/kdrive/fbdev/fbdev.h index d37b99597..b7951db72 100644 --- a/hw/kdrive/fbdev/fbdev.h +++ b/hw/kdrive/fbdev/fbdev.h @@ -53,6 +53,7 @@ typedef struct _fbdevScrPriv { } FbdevScrPriv; extern KdCardFuncs fbdevFuncs; +extern char* fbdevDevicePath; Bool fbdevInitialize (KdCardInfo *card, FbdevPriv *priv); diff --git a/hw/kdrive/fbdev/fbinit.c b/hw/kdrive/fbdev/fbinit.c index ba9d1c695..1a7e4bff2 100644 --- a/hw/kdrive/fbdev/fbinit.c +++ b/hw/kdrive/fbdev/fbinit.c @@ -54,17 +54,30 @@ InitInput (int argc, char **argv) void ddxUseMsg (void) { - KdUseMsg(); + KdUseMsg(); + ErrorF("\nXfbdev Device Usage:\n"); + ErrorF("-fb path Framebuffer device to use. Defaults to /dev/fb0\n"); + ErrorF("\n"); } int ddxProcessArgument (int argc, char **argv, int i) { - return KdProcessArgument (argc, argv, i); + if (!strcmp (argv[i], "-fb")) + { + if (i+1 < argc) + { + fbdevDevicePath = argv[i+1]; + return 2; + } + UseMsg(); + exit(1); + } + + return KdProcessArgument (argc, argv, i); } - - +char *fbdevDevicePath = NULL; KdCardFuncs fbdevFuncs = { fbdevCardInit, /* cardinit */ fbdevScreenInit, /* scrinit */ From 69d5becce4ca2cfc8f8de53672ed54a47de62164 Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Thu, 31 Aug 2006 17:30:24 +0100 Subject: [PATCH 09/17] Fix previous commit breaking other kdrives pulling in fbdev.a --- hw/kdrive/fbdev/fbdev.c | 2 ++ hw/kdrive/fbdev/fbinit.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index 904d5f315..20bf75800 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -33,6 +33,8 @@ extern int KdTsPhyScreen; +char *fbdevDevicePath = NULL; + Bool fbdevInitialize (KdCardInfo *card, FbdevPriv *priv) { diff --git a/hw/kdrive/fbdev/fbinit.c b/hw/kdrive/fbdev/fbinit.c index 1a7e4bff2..ee373276b 100644 --- a/hw/kdrive/fbdev/fbinit.c +++ b/hw/kdrive/fbdev/fbinit.c @@ -77,7 +77,7 @@ ddxProcessArgument (int argc, char **argv, int i) return KdProcessArgument (argc, argv, i); } -char *fbdevDevicePath = NULL; + KdCardFuncs fbdevFuncs = { fbdevCardInit, /* cardinit */ fbdevScreenInit, /* scrinit */ From a9ef5862919313582f72fc0cfb5ab0af4df6507e Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 31 Aug 2006 13:47:50 -0700 Subject: [PATCH 10/17] Fix problems with vertex program protocol There were two sets of bugs in the vertex program (ARB and NV) protocol. First, several of the ARB functions were missing the 'doubles_in_order="true"' annotation. Second, after the ARB decided that glVertexAttrib*ARB functions must not alias fixed-function state for GLSL, Nvidia re-assigned GLX protocol opcodes for glVertexAttrib*NV (circa Septeber 2004). For some reason gl_API.xml was never updated to reflect this, and the updated version of the GL_NV_vertex_program spec never made into the registry. This is just a server-side regeneration from gl_API.xml version 1.68. --- GL/glx/indirect_dispatch.c | 16 +- GL/glx/indirect_dispatch_swap.c | 16 +- GL/glx/indirect_table.c | 459 +++++++++++++++++--------------- 3 files changed, 258 insertions(+), 233 deletions(-) diff --git a/GL/glx/indirect_dispatch.c b/GL/glx/indirect_dispatch.c index 04bb2049e..d43afeb68 100644 --- a/GL/glx/indirect_dispatch.c +++ b/GL/glx/indirect_dispatch.c @@ -4038,8 +4038,8 @@ void __glXDisp_VertexAttrib1dvARB(GLbyte * pc) #endif CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 8), - (const GLdouble *)(pc + 0) + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) ) ); } @@ -4069,8 +4069,8 @@ void __glXDisp_VertexAttrib2dvARB(GLbyte * pc) #endif CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 16), - (const GLdouble *)(pc + 0) + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) ) ); } @@ -4100,8 +4100,8 @@ void __glXDisp_VertexAttrib3dvARB(GLbyte * pc) #endif CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 24), - (const GLdouble *)(pc + 0) + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) ) ); } @@ -4187,8 +4187,8 @@ void __glXDisp_VertexAttrib4dvARB(GLbyte * pc) #endif CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 32), - (const GLdouble *)(pc + 0) + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) ) ); } diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c index 9a06cceb4..a84879a40 100644 --- a/GL/glx/indirect_dispatch_swap.c +++ b/GL/glx/indirect_dispatch_swap.c @@ -4186,8 +4186,8 @@ void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc) #endif CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 8 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) ) ); } @@ -4217,8 +4217,8 @@ void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc) #endif CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 16 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) ) ); } @@ -4248,8 +4248,8 @@ void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc) #endif CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 24 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) ) ); } @@ -4335,8 +4335,8 @@ void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc) #endif CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 32 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) ) ); } diff --git a/GL/glx/indirect_table.c b/GL/glx/indirect_table.c index 3e294ad5e..de3986cdc 100644 --- a/GL/glx/indirect_table.c +++ b/GL/glx/indirect_table.c @@ -199,7 +199,7 @@ const struct __glXDispatchInfo Single_dispatch_info = { /*****************************************************************/ /* tree depth = 8 */ -static const int_fast16_t Render_dispatch_tree[96] = { +static const int_fast16_t Render_dispatch_tree[95] = { /* [0] -> opcode range [0, 8192], node depth 1 */ 2, 5, @@ -294,59 +294,52 @@ static const int_fast16_t Render_dispatch_tree[96] = { EMPTY_LEAF, /* [63] -> opcode range [4096, 4352], node depth 5 */ - 3, + 4, LEAF(264), - 72, - 78, + LEAF(280), + 80, + EMPTY_LEAF, + EMPTY_LEAF, LEAF(296), - 81, - EMPTY_LEAF, - 84, - 90, - - /* [72] -> opcode range [4128, 4160], node depth 6 */ - 1, - 75, - EMPTY_LEAF, - - /* [75] -> opcode range [4128, 4144], node depth 7 */ - 1, + LEAF(312), LEAF(328), + LEAF(344), + EMPTY_LEAF, + 83, + 86, + EMPTY_LEAF, + 89, + 92, EMPTY_LEAF, - /* [78] -> opcode range [4160, 4192], node depth 6 */ + /* [80] -> opcode range [4128, 4144], node depth 6 */ 1, - EMPTY_LEAF, - LEAF(336), - - /* [81] -> opcode range [4224, 4256], node depth 6 */ - 1, - LEAF(352), + LEAF(360), EMPTY_LEAF, - /* [84] -> opcode range [4288, 4320], node depth 6 */ - 1, - EMPTY_LEAF, - 87, - - /* [87] -> opcode range [4304, 4320], node depth 7 */ + /* [83] -> opcode range [4256, 4272], node depth 6 */ 1, EMPTY_LEAF, LEAF(368), - /* [90] -> opcode range [4320, 4352], node depth 6 */ - 1, - 93, - EMPTY_LEAF, - - /* [93] -> opcode range [4320, 4336], node depth 7 */ + /* [86] -> opcode range [4272, 4288], node depth 6 */ 1, LEAF(376), EMPTY_LEAF, + /* [89] -> opcode range [4304, 4320], node depth 6 */ + 1, + EMPTY_LEAF, + LEAF(384), + + /* [92] -> opcode range [4320, 4336], node depth 6 */ + 1, + LEAF(392), + EMPTY_LEAF, + }; -static const void *Render_function_table[384][2] = { +static const void *Render_function_table[400][2] = { /* [ 0] = 0 */ {NULL, NULL}, /* [ 1] = 1 */ {__glXDisp_CallList, __glXDispSwap_CallList}, /* [ 2] = 2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists}, @@ -643,97 +636,113 @@ static const void *Render_function_table[384][2] = { /* [ 293] = 4125 */ {__glXDisp_FogCoorddvEXT, __glXDispSwap_FogCoorddvEXT}, /* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bvEXT, __glXDispSwap_SecondaryColor3bvEXT}, /* [ 295] = 4127 */ {__glXDisp_SecondaryColor3svEXT, __glXDispSwap_SecondaryColor3svEXT}, - /* [ 296] = 4192 */ {__glXDisp_VertexAttrib4svARB, __glXDispSwap_VertexAttrib4svARB}, - /* [ 297] = 4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB}, - /* [ 298] = 4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB}, - /* [ 299] = 4195 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV}, - /* [ 300] = 4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB}, - /* [ 301] = 4197 */ {__glXDisp_VertexAttrib1dvARB, __glXDispSwap_VertexAttrib1dvARB}, - /* [ 302] = 4198 */ {__glXDisp_VertexAttrib2dvARB, __glXDispSwap_VertexAttrib2dvARB}, - /* [ 303] = 4199 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV}, - /* [ 304] = 4200 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV}, - /* [ 305] = 4201 */ {__glXDisp_VertexAttrib4NubvARB, __glXDispSwap_VertexAttrib4NubvARB}, - /* [ 306] = 4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV}, - /* [ 307] = 4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV}, - /* [ 308] = 4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV}, - /* [ 309] = 4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV}, - /* [ 310] = 4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV}, - /* [ 311] = 4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV}, - /* [ 312] = 4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV}, - /* [ 313] = 4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV}, - /* [ 314] = 4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV}, - /* [ 315] = 4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV}, - /* [ 316] = 4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV}, - /* [ 317] = 4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV}, - /* [ 318] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV}, - /* [ 319] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB}, - /* [ 320] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB}, - /* [ 321] = 4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB}, - /* [ 322] = 4218 */ {__glXDisp_ProgramNamedParameter4fvNV, __glXDispSwap_ProgramNamedParameter4fvNV}, - /* [ 323] = 4219 */ {__glXDisp_ProgramNamedParameter4dvNV, __glXDispSwap_ProgramNamedParameter4dvNV}, - /* [ 324] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT}, - /* [ 325] = 4221 */ {__glXDisp_PointParameteriNV, __glXDispSwap_PointParameteriNV}, - /* [ 326] = 4222 */ {__glXDisp_PointParameterivNV, __glXDispSwap_PointParameterivNV}, - /* [ 327] = 4223 */ {NULL, NULL}, - /* [ 328] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT}, - /* [ 329] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT}, - /* [ 330] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT}, - /* [ 331] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT}, - /* [ 332] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT}, - /* [ 333] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT}, - /* [ 334] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT}, - /* [ 335] = 4135 */ {NULL, NULL}, - /* [ 336] = 4176 */ {NULL, NULL}, - /* [ 337] = 4177 */ {NULL, NULL}, - /* [ 338] = 4178 */ {NULL, NULL}, - /* [ 339] = 4179 */ {NULL, NULL}, - /* [ 340] = 4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV}, - /* [ 341] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV}, - /* [ 342] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV}, - /* [ 343] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV}, - /* [ 344] = 4184 */ {__glXDisp_ProgramParameter4fvNV, __glXDispSwap_ProgramParameter4fvNV}, - /* [ 345] = 4185 */ {__glXDisp_ProgramParameter4dvNV, __glXDispSwap_ProgramParameter4dvNV}, - /* [ 346] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV}, - /* [ 347] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV}, - /* [ 348] = 4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV}, - /* [ 349] = 4189 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV}, - /* [ 350] = 4190 */ {__glXDisp_VertexAttrib2svARB, __glXDispSwap_VertexAttrib2svARB}, - /* [ 351] = 4191 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV}, - /* [ 352] = 4224 */ {NULL, NULL}, - /* [ 353] = 4225 */ {NULL, NULL}, - /* [ 354] = 4226 */ {NULL, NULL}, - /* [ 355] = 4227 */ {NULL, NULL}, - /* [ 356] = 4228 */ {__glXDisp_BlendEquationSeparateEXT, __glXDispSwap_BlendEquationSeparateEXT}, - /* [ 357] = 4229 */ {NULL, NULL}, - /* [ 358] = 4230 */ {__glXDisp_VertexAttrib4bvARB, __glXDispSwap_VertexAttrib4bvARB}, - /* [ 359] = 4231 */ {__glXDisp_VertexAttrib4ivARB, __glXDispSwap_VertexAttrib4ivARB}, - /* [ 360] = 4232 */ {__glXDisp_VertexAttrib4ubvARB, __glXDispSwap_VertexAttrib4ubvARB}, - /* [ 361] = 4233 */ {__glXDisp_VertexAttrib4usvARB, __glXDispSwap_VertexAttrib4usvARB}, - /* [ 362] = 4234 */ {__glXDisp_VertexAttrib4uivARB, __glXDispSwap_VertexAttrib4uivARB}, - /* [ 363] = 4235 */ {__glXDisp_VertexAttrib4NbvARB, __glXDispSwap_VertexAttrib4NbvARB}, - /* [ 364] = 4236 */ {__glXDisp_VertexAttrib4NsvARB, __glXDispSwap_VertexAttrib4NsvARB}, - /* [ 365] = 4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB}, - /* [ 366] = 4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB}, - /* [ 367] = 4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB}, - /* [ 368] = 4312 */ {NULL, NULL}, - /* [ 369] = 4313 */ {NULL, NULL}, - /* [ 370] = 4314 */ {NULL, NULL}, - /* [ 371] = 4315 */ {NULL, NULL}, - /* [ 372] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT}, - /* [ 373] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT}, - /* [ 374] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT}, - /* [ 375] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT}, - /* [ 376] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT}, - /* [ 377] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT}, - /* [ 378] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT}, - /* [ 379] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT}, - /* [ 380] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT}, - /* [ 381] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT}, - /* [ 382] = 4326 */ {NULL, NULL}, - /* [ 383] = 4327 */ {NULL, NULL}, + /* [ 296] = 4176 */ {NULL, NULL}, + /* [ 297] = 4177 */ {NULL, NULL}, + /* [ 298] = 4178 */ {NULL, NULL}, + /* [ 299] = 4179 */ {NULL, NULL}, + /* [ 300] = 4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV}, + /* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV}, + /* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV}, + /* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV}, + /* [ 304] = 4184 */ {__glXDisp_ProgramParameter4fvNV, __glXDispSwap_ProgramParameter4fvNV}, + /* [ 305] = 4185 */ {__glXDisp_ProgramParameter4dvNV, __glXDispSwap_ProgramParameter4dvNV}, + /* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV}, + /* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV}, + /* [ 308] = 4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV}, + /* [ 309] = 4189 */ {__glXDisp_VertexAttrib1svARB, __glXDispSwap_VertexAttrib1svARB}, + /* [ 310] = 4190 */ {__glXDisp_VertexAttrib2svARB, __glXDispSwap_VertexAttrib2svARB}, + /* [ 311] = 4191 */ {__glXDisp_VertexAttrib3svARB, __glXDispSwap_VertexAttrib3svARB}, + /* [ 312] = 4192 */ {__glXDisp_VertexAttrib4svARB, __glXDispSwap_VertexAttrib4svARB}, + /* [ 313] = 4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB}, + /* [ 314] = 4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB}, + /* [ 315] = 4195 */ {__glXDisp_VertexAttrib3fvARB, __glXDispSwap_VertexAttrib3fvARB}, + /* [ 316] = 4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB}, + /* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dvARB, __glXDispSwap_VertexAttrib1dvARB}, + /* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dvARB, __glXDispSwap_VertexAttrib2dvARB}, + /* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dvARB, __glXDispSwap_VertexAttrib3dvARB}, + /* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dvARB, __glXDispSwap_VertexAttrib4dvARB}, + /* [ 321] = 4201 */ {__glXDisp_VertexAttrib4NubvARB, __glXDispSwap_VertexAttrib4NubvARB}, + /* [ 322] = 4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV}, + /* [ 323] = 4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV}, + /* [ 324] = 4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV}, + /* [ 325] = 4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV}, + /* [ 326] = 4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV}, + /* [ 327] = 4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV}, + /* [ 328] = 4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV}, + /* [ 329] = 4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV}, + /* [ 330] = 4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV}, + /* [ 331] = 4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV}, + /* [ 332] = 4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV}, + /* [ 333] = 4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV}, + /* [ 334] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV}, + /* [ 335] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB}, + /* [ 336] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB}, + /* [ 337] = 4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB}, + /* [ 338] = 4218 */ {__glXDisp_ProgramNamedParameter4fvNV, __glXDispSwap_ProgramNamedParameter4fvNV}, + /* [ 339] = 4219 */ {__glXDisp_ProgramNamedParameter4dvNV, __glXDispSwap_ProgramNamedParameter4dvNV}, + /* [ 340] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT}, + /* [ 341] = 4221 */ {__glXDisp_PointParameteriNV, __glXDispSwap_PointParameteriNV}, + /* [ 342] = 4222 */ {__glXDisp_PointParameterivNV, __glXDispSwap_PointParameterivNV}, + /* [ 343] = 4223 */ {NULL, NULL}, + /* [ 344] = 4224 */ {NULL, NULL}, + /* [ 345] = 4225 */ {NULL, NULL}, + /* [ 346] = 4226 */ {NULL, NULL}, + /* [ 347] = 4227 */ {NULL, NULL}, + /* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparateEXT, __glXDispSwap_BlendEquationSeparateEXT}, + /* [ 349] = 4229 */ {NULL, NULL}, + /* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bvARB, __glXDispSwap_VertexAttrib4bvARB}, + /* [ 351] = 4231 */ {__glXDisp_VertexAttrib4ivARB, __glXDispSwap_VertexAttrib4ivARB}, + /* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubvARB, __glXDispSwap_VertexAttrib4ubvARB}, + /* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usvARB, __glXDispSwap_VertexAttrib4usvARB}, + /* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uivARB, __glXDispSwap_VertexAttrib4uivARB}, + /* [ 355] = 4235 */ {__glXDisp_VertexAttrib4NbvARB, __glXDispSwap_VertexAttrib4NbvARB}, + /* [ 356] = 4236 */ {__glXDisp_VertexAttrib4NsvARB, __glXDispSwap_VertexAttrib4NsvARB}, + /* [ 357] = 4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB}, + /* [ 358] = 4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB}, + /* [ 359] = 4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB}, + /* [ 360] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT}, + /* [ 361] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT}, + /* [ 362] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT}, + /* [ 363] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT}, + /* [ 364] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT}, + /* [ 365] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT}, + /* [ 366] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT}, + /* [ 367] = 4135 */ {NULL, NULL}, + /* [ 368] = 4264 */ {NULL, NULL}, + /* [ 369] = 4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV}, + /* [ 370] = 4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV}, + /* [ 371] = 4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV}, + /* [ 372] = 4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV}, + /* [ 373] = 4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV}, + /* [ 374] = 4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV}, + /* [ 375] = 4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV}, + /* [ 376] = 4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV}, + /* [ 377] = 4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV}, + /* [ 378] = 4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV}, + /* [ 379] = 4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV}, + /* [ 380] = 4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV}, + /* [ 381] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV}, + /* [ 382] = 4278 */ {NULL, NULL}, + /* [ 383] = 4279 */ {NULL, NULL}, + /* [ 384] = 4312 */ {NULL, NULL}, + /* [ 385] = 4313 */ {NULL, NULL}, + /* [ 386] = 4314 */ {NULL, NULL}, + /* [ 387] = 4315 */ {NULL, NULL}, + /* [ 388] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT}, + /* [ 389] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT}, + /* [ 390] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT}, + /* [ 391] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT}, + /* [ 392] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT}, + /* [ 393] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT}, + /* [ 394] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT}, + /* [ 395] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT}, + /* [ 396] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT}, + /* [ 397] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT}, + /* [ 398] = 4326 */ {NULL, NULL}, + /* [ 399] = 4327 */ {NULL, NULL}, }; -static const int_fast16_t Render_size_table[384][2] = { +static const int_fast16_t Render_size_table[400][2] = { /* [ 0] = 0 */ { 0, ~0}, /* [ 1] = 1 */ { 8, ~0}, /* [ 2] = 2 */ { 12, 0}, @@ -1030,94 +1039,110 @@ static const int_fast16_t Render_size_table[384][2] = { /* [293] = 4125 */ { 12, ~0}, /* [294] = 4126 */ { 8, ~0}, /* [295] = 4127 */ { 12, ~0}, - /* [296] = 4192 */ { 16, ~0}, - /* [297] = 4193 */ { 12, ~0}, - /* [298] = 4194 */ { 16, ~0}, - /* [299] = 4195 */ { 20, ~0}, - /* [300] = 4196 */ { 24, ~0}, - /* [301] = 4197 */ { 16, ~0}, - /* [302] = 4198 */ { 24, ~0}, - /* [303] = 4199 */ { 32, ~0}, - /* [304] = 4200 */ { 40, ~0}, - /* [305] = 4201 */ { 12, ~0}, - /* [306] = 4202 */ { 12, 51}, - /* [307] = 4203 */ { 12, 52}, - /* [308] = 4204 */ { 12, 53}, - /* [309] = 4205 */ { 12, 54}, - /* [310] = 4206 */ { 12, 55}, - /* [311] = 4207 */ { 12, 56}, - /* [312] = 4208 */ { 12, 57}, - /* [313] = 4209 */ { 12, 58}, - /* [314] = 4210 */ { 12, 59}, - /* [315] = 4211 */ { 12, 60}, - /* [316] = 4212 */ { 12, 61}, - /* [317] = 4213 */ { 12, 62}, - /* [318] = 4214 */ { 12, 63}, - /* [319] = 4215 */ { 28, ~0}, - /* [320] = 4216 */ { 44, ~0}, - /* [321] = 4217 */ { 16, 64}, - /* [322] = 4218 */ { 28, 65}, - /* [323] = 4219 */ { 44, 66}, - /* [324] = 4220 */ { 8, ~0}, - /* [325] = 4221 */ { 12, ~0}, - /* [326] = 4222 */ { 8, 67}, - /* [327] = 4223 */ { 0, ~0}, - /* [328] = 4128 */ { 16, ~0}, - /* [329] = 4129 */ { 16, ~0}, - /* [330] = 4130 */ { 28, ~0}, - /* [331] = 4131 */ { 8, ~0}, - /* [332] = 4132 */ { 12, ~0}, - /* [333] = 4133 */ { 16, ~0}, - /* [334] = 4134 */ { 20, ~0}, - /* [335] = 4135 */ { 0, ~0}, - /* [336] = 4176 */ { 0, ~0}, - /* [337] = 4177 */ { 0, ~0}, - /* [338] = 4178 */ { 0, ~0}, - /* [339] = 4179 */ { 0, ~0}, - /* [340] = 4180 */ { 12, ~0}, - /* [341] = 4181 */ { 28, ~0}, - /* [342] = 4182 */ { 8, 68}, - /* [343] = 4183 */ { 16, 69}, - /* [344] = 4184 */ { 28, ~0}, - /* [345] = 4185 */ { 44, ~0}, - /* [346] = 4186 */ { 16, 70}, - /* [347] = 4187 */ { 16, 71}, - /* [348] = 4188 */ { 20, ~0}, - /* [349] = 4189 */ { 12, ~0}, - /* [350] = 4190 */ { 12, ~0}, - /* [351] = 4191 */ { 16, ~0}, - /* [352] = 4224 */ { 0, ~0}, - /* [353] = 4225 */ { 0, ~0}, - /* [354] = 4226 */ { 0, ~0}, - /* [355] = 4227 */ { 0, ~0}, - /* [356] = 4228 */ { 12, ~0}, - /* [357] = 4229 */ { 0, ~0}, - /* [358] = 4230 */ { 12, ~0}, - /* [359] = 4231 */ { 24, ~0}, - /* [360] = 4232 */ { 12, ~0}, - /* [361] = 4233 */ { 16, ~0}, - /* [362] = 4234 */ { 24, ~0}, - /* [363] = 4235 */ { 12, ~0}, - /* [364] = 4236 */ { 16, ~0}, - /* [365] = 4237 */ { 24, ~0}, - /* [366] = 4238 */ { 16, ~0}, - /* [367] = 4239 */ { 24, ~0}, - /* [368] = 4312 */ { 0, ~0}, - /* [369] = 4313 */ { 0, ~0}, - /* [370] = 4314 */ { 0, ~0}, - /* [371] = 4315 */ { 0, ~0}, - /* [372] = 4316 */ { 12, ~0}, - /* [373] = 4317 */ { 8, 72}, - /* [374] = 4318 */ { 20, ~0}, - /* [375] = 4319 */ { 12, ~0}, - /* [376] = 4320 */ { 8, 73}, - /* [377] = 4321 */ { 24, ~0}, - /* [378] = 4322 */ { 24, ~0}, - /* [379] = 4323 */ { 28, ~0}, - /* [380] = 4324 */ { 20, ~0}, - /* [381] = 4325 */ { 8, ~0}, - /* [382] = 4326 */ { 0, ~0}, - /* [383] = 4327 */ { 0, ~0}, + /* [296] = 4176 */ { 0, ~0}, + /* [297] = 4177 */ { 0, ~0}, + /* [298] = 4178 */ { 0, ~0}, + /* [299] = 4179 */ { 0, ~0}, + /* [300] = 4180 */ { 12, ~0}, + /* [301] = 4181 */ { 28, ~0}, + /* [302] = 4182 */ { 8, 51}, + /* [303] = 4183 */ { 16, 52}, + /* [304] = 4184 */ { 28, ~0}, + /* [305] = 4185 */ { 44, ~0}, + /* [306] = 4186 */ { 16, 53}, + /* [307] = 4187 */ { 16, 54}, + /* [308] = 4188 */ { 20, ~0}, + /* [309] = 4189 */ { 12, ~0}, + /* [310] = 4190 */ { 12, ~0}, + /* [311] = 4191 */ { 16, ~0}, + /* [312] = 4192 */ { 16, ~0}, + /* [313] = 4193 */ { 12, ~0}, + /* [314] = 4194 */ { 16, ~0}, + /* [315] = 4195 */ { 20, ~0}, + /* [316] = 4196 */ { 24, ~0}, + /* [317] = 4197 */ { 16, ~0}, + /* [318] = 4198 */ { 24, ~0}, + /* [319] = 4199 */ { 32, ~0}, + /* [320] = 4200 */ { 40, ~0}, + /* [321] = 4201 */ { 12, ~0}, + /* [322] = 4202 */ { 12, 55}, + /* [323] = 4203 */ { 12, 56}, + /* [324] = 4204 */ { 12, 57}, + /* [325] = 4205 */ { 12, 58}, + /* [326] = 4206 */ { 12, 59}, + /* [327] = 4207 */ { 12, 60}, + /* [328] = 4208 */ { 12, 61}, + /* [329] = 4209 */ { 12, 62}, + /* [330] = 4210 */ { 12, 63}, + /* [331] = 4211 */ { 12, 64}, + /* [332] = 4212 */ { 12, 65}, + /* [333] = 4213 */ { 12, 66}, + /* [334] = 4214 */ { 12, 67}, + /* [335] = 4215 */ { 28, ~0}, + /* [336] = 4216 */ { 44, ~0}, + /* [337] = 4217 */ { 16, 68}, + /* [338] = 4218 */ { 28, 69}, + /* [339] = 4219 */ { 44, 70}, + /* [340] = 4220 */ { 8, ~0}, + /* [341] = 4221 */ { 12, ~0}, + /* [342] = 4222 */ { 8, 71}, + /* [343] = 4223 */ { 0, ~0}, + /* [344] = 4224 */ { 0, ~0}, + /* [345] = 4225 */ { 0, ~0}, + /* [346] = 4226 */ { 0, ~0}, + /* [347] = 4227 */ { 0, ~0}, + /* [348] = 4228 */ { 12, ~0}, + /* [349] = 4229 */ { 0, ~0}, + /* [350] = 4230 */ { 12, ~0}, + /* [351] = 4231 */ { 24, ~0}, + /* [352] = 4232 */ { 12, ~0}, + /* [353] = 4233 */ { 16, ~0}, + /* [354] = 4234 */ { 24, ~0}, + /* [355] = 4235 */ { 12, ~0}, + /* [356] = 4236 */ { 16, ~0}, + /* [357] = 4237 */ { 24, ~0}, + /* [358] = 4238 */ { 16, ~0}, + /* [359] = 4239 */ { 24, ~0}, + /* [360] = 4128 */ { 16, ~0}, + /* [361] = 4129 */ { 16, ~0}, + /* [362] = 4130 */ { 28, ~0}, + /* [363] = 4131 */ { 8, ~0}, + /* [364] = 4132 */ { 12, ~0}, + /* [365] = 4133 */ { 16, ~0}, + /* [366] = 4134 */ { 20, ~0}, + /* [367] = 4135 */ { 0, ~0}, + /* [368] = 4264 */ { 0, ~0}, + /* [369] = 4265 */ { 12, ~0}, + /* [370] = 4266 */ { 12, ~0}, + /* [371] = 4267 */ { 16, ~0}, + /* [372] = 4268 */ { 16, ~0}, + /* [373] = 4269 */ { 12, ~0}, + /* [374] = 4270 */ { 16, ~0}, + /* [375] = 4271 */ { 20, ~0}, + /* [376] = 4272 */ { 24, ~0}, + /* [377] = 4273 */ { 16, ~0}, + /* [378] = 4274 */ { 24, ~0}, + /* [379] = 4275 */ { 32, ~0}, + /* [380] = 4276 */ { 40, ~0}, + /* [381] = 4277 */ { 12, ~0}, + /* [382] = 4278 */ { 0, ~0}, + /* [383] = 4279 */ { 0, ~0}, + /* [384] = 4312 */ { 0, ~0}, + /* [385] = 4313 */ { 0, ~0}, + /* [386] = 4314 */ { 0, ~0}, + /* [387] = 4315 */ { 0, ~0}, + /* [388] = 4316 */ { 12, ~0}, + /* [389] = 4317 */ { 8, 72}, + /* [390] = 4318 */ { 20, ~0}, + /* [391] = 4319 */ { 12, ~0}, + /* [392] = 4320 */ { 8, 73}, + /* [393] = 4321 */ { 24, ~0}, + /* [394] = 4322 */ { 24, ~0}, + /* [395] = 4323 */ { 28, ~0}, + /* [396] = 4324 */ { 20, ~0}, + /* [397] = 4325 */ { 8, ~0}, + /* [398] = 4326 */ { 0, ~0}, + /* [399] = 4327 */ { 0, ~0}, }; static const gl_proto_size_func Render_size_func_table[74] = { @@ -1172,6 +1197,10 @@ static const gl_proto_size_func Render_size_func_table[74] = { __glXTexImage3DReqSize, __glXTexSubImage3DReqSize, __glXPrioritizeTexturesReqSize, + __glXRequestResidentProgramsNVReqSize, + __glXLoadProgramNVReqSize, + __glXProgramParameters4fvNVReqSize, + __glXProgramParameters4dvNVReqSize, __glXVertexAttribs1svNVReqSize, __glXVertexAttribs2svNVReqSize, __glXVertexAttribs3svNVReqSize, @@ -1189,10 +1218,6 @@ static const gl_proto_size_func Render_size_func_table[74] = { __glXProgramNamedParameter4fvNVReqSize, __glXProgramNamedParameter4dvNVReqSize, __glXPointParameterivNVReqSize, - __glXRequestResidentProgramsNVReqSize, - __glXLoadProgramNVReqSize, - __glXProgramParameters4fvNVReqSize, - __glXProgramParameters4dvNVReqSize, __glXDeleteRenderbuffersEXTReqSize, __glXDeleteFramebuffersEXTReqSize, }; From 0f9cfb2f752a9010ff07f4b2bd891db0cc30b8e6 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 31 Aug 2006 13:54:10 -0700 Subject: [PATCH 11/17] Implement GLX_SGI_swap_control. Regenerate from glX_API.xml 1.2. Add infrastructure to support GLX_SGI_swap_control for AIGLX when the DRI driver enables it. Tested with R300. --- GL/glx/Makefile.am | 1 + GL/glx/extension_string.c | 4 +-- GL/glx/glxcmds.c | 3 --- GL/glx/glxdri.c | 50 ++++++++++++++++++++++++-------------- GL/glx/glxscreens.h | 2 ++ GL/glx/indirect_dispatch.h | 10 +++++--- GL/glx/indirect_table.c | 2 +- 7 files changed, 43 insertions(+), 29 deletions(-) diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 9bb2b7eff..44d9cf9e4 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -77,5 +77,6 @@ libglx_la_SOURCES = \ singlepixswap.c \ singlesize.c \ singlesize.h \ + swap_interval.c \ unpack.h \ xfont.c diff --git a/GL/glx/extension_string.c b/GL/glx/extension_string.c index 8f13963ce..a4b202af3 100644 --- a/GL/glx/extension_string.c +++ b/GL/glx/extension_string.c @@ -60,7 +60,7 @@ struct extension_info { unsigned char version_minor; /** - * Is driver supported foced by the ABI? + * Is driver support forced by the ABI? */ unsigned char driver_support; }; @@ -77,9 +77,7 @@ static const struct extension_info known_glx_extensions[] = { { GLX(MESA_copy_sub_buffer), VER(0,0), N, }, { GLX(OML_swap_method), VER(0,0), Y, }, { GLX(SGI_make_current_read), VER(1,3), N, }, -#if 0 /* GLX protocol not yet supported for these. */ { GLX(SGI_swap_control), VER(0,0), N, }, -#endif { GLX(SGIS_multisample), VER(0,0), Y, }, { GLX(SGIX_fbconfig), VER(1,3), Y, }, { GLX(SGIX_pbuffer), VER(1,3), N, }, diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c index 3092f853f..ccdf3fa00 100644 --- a/GL/glx/glxcmds.c +++ b/GL/glx/glxcmds.c @@ -2274,9 +2274,6 @@ int __glXDisp_VendorPrivate(__GLXclientState *cl, GLbyte *pc) return Success; } - /* - ** This sample implemention does not support any private requests. - */ cl->client->errorValue = req->vendorCode; return __glXError(GLXUnsupportedPrivateRequest); } diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index 212f2a80c..41e49e225 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -148,6 +148,22 @@ __glXDRIenterServer(void) DRIWakeupHandler(NULL, 0, NULL); } +/** + * \bug + * We're jumping through hoops here to get the DRIdrawable which the DRI + * driver tries to keep to it self... cf. FIXME in \c createDrawable. + */ +static void +__glXDRIdrawableFoo(__GLXDRIdrawable *draw) +{ + __GLXDRIscreen * const screen = + (__GLXDRIscreen *) __glXgetActiveScreen(draw->base.pDraw->pScreen->myNum); + + draw->driDrawable = (*screen->driScreen.getDrawable)(NULL, + draw->base.drawId, + screen->driScreen.private); +} + static void __glXDRIdrawableDestroy(__GLXdrawable *private) { @@ -172,16 +188,8 @@ static GLboolean __glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; - __GLXDRIscreen *screen; - /* FIXME: We're jumping through hoops here to get the DRIdrawable - * which the dri driver tries to keep to it self... cf. FIXME in - * createDrawable. */ - - screen = (__GLXDRIscreen *) __glXgetActiveScreen(private->base.pDraw->pScreen->myNum); - private->driDrawable = (screen->driScreen.getDrawable)(NULL, - private->base.drawId, - screen->driScreen.private); + __glXDRIdrawableFoo(private); (*private->driDrawable->swapBuffers)(NULL, private->driDrawable->private); @@ -189,21 +197,26 @@ __glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate) return TRUE; } + +static int +__glXDRIdrawableSwapInterval(__GLXdrawable *baseDrawable, int interval) +{ + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseDrawable; + + __glXDRIdrawableFoo(draw); + + draw->driDrawable->swap_interval = interval; + return 0; +} + + static void __glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate, int x, int y, int w, int h) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; - __GLXDRIscreen *screen; - /* FIXME: We're jumping through hoops here to get the DRIdrawable - * which the dri driver tries to keep to it self... cf. FIXME in - * createDrawable. */ - - screen = (__GLXDRIscreen *) __glXgetActiveScreen(private->base.pDraw->pScreen->myNum); - private->driDrawable = (screen->driScreen.getDrawable)(NULL, - private->base.drawId, - screen->driScreen.private); + __glXDRIdrawableFoo(private); (*private->driDrawable->copySubBuffer)(NULL, private->driDrawable->private, @@ -849,6 +862,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) screen->base.destroy = __glXDRIscreenDestroy; screen->base.createContext = __glXDRIscreenCreateContext; screen->base.createDrawable = __glXDRIscreenCreateDrawable; + screen->base.swapInterval = __glXDRIdrawableSwapInterval; screen->base.pScreen = pScreen; __glXInitExtensionEnableBits(screen->glx_enable_bits); diff --git a/GL/glx/glxscreens.h b/GL/glx/glxscreens.h index 8beec17ec..a7700f649 100644 --- a/GL/glx/glxscreens.h +++ b/GL/glx/glxscreens.h @@ -62,6 +62,8 @@ struct __GLXscreen { DrawablePtr pDraw, XID drawId, __GLcontextModes *modes); + int (*swapInterval) (__GLXdrawable *drawable, + int interval); ScreenPtr pScreen; diff --git a/GL/glx/indirect_dispatch.h b/GL/glx/indirect_dispatch.h index 2a2fd27c6..c259fd930 100644 --- a/GL/glx/indirect_dispatch.h +++ b/GL/glx/indirect_dispatch.h @@ -401,8 +401,8 @@ extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc); extern HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc); extern HIDDEN void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc); extern HIDDEN void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc); @@ -549,6 +549,8 @@ extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc); extern HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc); extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc); extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); @@ -679,8 +681,8 @@ extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc); extern HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc); diff --git a/GL/glx/indirect_table.c b/GL/glx/indirect_table.c index de3986cdc..d13e4f8df 100644 --- a/GL/glx/indirect_table.c +++ b/GL/glx/indirect_table.c @@ -1557,7 +1557,7 @@ static const void *VendorPriv_function_table[80][2] = { /* [ 69] = 5157 */ {NULL, NULL}, /* [ 70] = 5158 */ {NULL, NULL}, /* [ 71] = 5159 */ {NULL, NULL}, - /* [ 72] = 65536 */ {NULL, NULL}, + /* [ 72] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI}, /* [ 73] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI}, /* [ 74] = 65538 */ {NULL, NULL}, /* [ 75] = 65539 */ {NULL, NULL}, From c2813514cf7b1a36caa848cbc2ceef99cf2eb769 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 31 Aug 2006 15:36:13 -0700 Subject: [PATCH 12/17] Add missing file from previous commit. --- GL/glx/swap_interval.c | 105 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 GL/glx/swap_interval.c diff --git a/GL/glx/swap_interval.c b/GL/glx/swap_interval.c new file mode 100644 index 000000000..bcc1c4793 --- /dev/null +++ b/GL/glx/swap_interval.c @@ -0,0 +1,105 @@ +/* + * (C) Copyright IBM Corporation 2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to 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 + * THE COPYRIGHT HOLDERS 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 NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxutil.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "glapioffsets.h" + +#ifdef __linux__ +#include +#elif defined(__OpenBSD__) +#include +#define bswap_16 __swap16 +#define bswap_32 __swap32 +#define bswap_64 __swap64 +#else +#include +#define bswap_16 bswap16 +#define bswap_32 bswap32 +#define bswap_64 bswap64 +#endif + +static int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap); + +int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + ClientPtr client = cl->client; + const GLXContextTag tag = req->contextTag; + __GLXcontext *cx; + GLint interval; + + + cx = __glXLookupContextByTag(cl, tag); + + LogMessage(X_ERROR, "%s: cx = %p, GLX screen = %p\n", __func__, + cx, (cx == NULL) ? NULL : cx->pGlxScreen); + if ((cx == NULL) || (cx->pGlxScreen == NULL)) { + client->errorValue = tag; + return __glXError(GLXBadContext); + } + + if (cx->pGlxScreen->swapInterval == NULL) { + LogMessage(X_ERROR, "AIGLX: cx->pGlxScreen->swapInterval == NULL\n"); + client->errorValue = tag; + return __glXError(GLXUnsupportedPrivateRequest); + } + + if (cx->drawPriv == NULL) { + client->errorValue = tag; + return __glXError(GLXBadDrawable); + } + + pc += __GLX_VENDPRIV_HDR_SIZE; + interval = (do_swap) + ? bswap_32(*(int *)(pc + 0)) + : *(int *)(pc + 0); + + (void) (*cx->pGlxScreen->swapInterval)(cx->drawPriv, interval); + return Success; +} + +int __glXDisp_SwapIntervalSGI(__GLXclientState *cl, GLbyte *pc) +{ + return DoSwapInterval(cl, pc, 0); +} + +int __glXDispSwap_SwapIntervalSGI(__GLXclientState *cl, GLbyte *pc) +{ + return DoSwapInterval(cl, pc, 1); +} From 410e5b1d738ba47b36778e6cbed44023a27ce259 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Tue, 5 Sep 2006 15:23:54 -0700 Subject: [PATCH 13/17] (unsigned long)(1 << 31) = bad news on x86_64. --- fb/fbimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fb/fbimage.c b/fb/fbimage.c index bf5c06b57..3b4a07c3d 100644 --- a/fb/fbimage.c +++ b/fb/fbimage.c @@ -68,7 +68,7 @@ fbPutImage (DrawablePtr pDrawable, break; case XYPixmap: srcStride = BitmapBytePad(w + leftPad) / sizeof (FbStip); - for (i = 1 << (pDrawable->depth - 1); i; i >>= 1) + for (i = (unsigned long)1 << (pDrawable->depth - 1); i; i >>= 1) { if (i & pGC->planemask) { From f6ce0839ba5b73247097826d28f7388fe248ec0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Wed, 6 Sep 2006 13:18:02 +0200 Subject: [PATCH 14/17] Fix #include paths for fontcacheproto headers. --- Xext/fontcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xext/fontcache.c b/Xext/fontcache.c index 00a45c90e..db0348144 100644 --- a/Xext/fontcache.c +++ b/Xext/fontcache.c @@ -45,8 +45,8 @@ #include "inputstr.h" #include "servermd.h" #define _FONTCACHE_SERVER_ -#include "fontcacheP.h" -#include "fontcachstr.h" +#include +#include #include #include "swaprep.h" From 8356be492c6b46abdffa08b13836571ed872e16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Wed, 6 Sep 2006 15:20:55 +0200 Subject: [PATCH 15/17] Make sure _XSERVER64 is defined when it should be and gets tested. --- hw/dmx/Makefile.am | 1 + hw/dmx/dmx.h | 4 ++++ hw/xfree86/common/xf86.h | 6 ++++++ hw/xnest/Makefile.am | 2 +- mi/mieq.c | 4 ++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am index 81b62f1fe..d36647b54 100644 --- a/hw/dmx/Makefile.am +++ b/hw/dmx/Makefile.am @@ -83,6 +83,7 @@ Xdmx_LDADD = $(XORG_CORE_LIBS) \ Xdmx_CFLAGS = \ -DHAVE_DMX_CONFIG_H \ + $(DIX_CFLAGS) \ $(GLX_INCS) \ $(GLX_DEFS) \ @DMXMODULES_CFLAGS@ diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h index 18e75de90..becb2da38 100644 --- a/hw/dmx/dmx.h +++ b/hw/dmx/dmx.h @@ -51,6 +51,10 @@ #ifndef DMX_H #define DMX_H +#if HAVE_DMX_CONFIG_H +#include +#endif + #include "gcstruct.h" /* Handle client-side include files in one place. */ diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 4903791f2..458750007 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -36,6 +36,12 @@ #ifndef _XF86_H #define _XF86_H +#if HAVE_XORG_CONFIG_H +#include +#elif HAVE_DIX_CONFIG_H +#include +#endif + #include "xf86str.h" #include "xf86Opt.h" #include diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am index b237788bc..d40d122f4 100644 --- a/hw/xnest/Makefile.am +++ b/hw/xnest/Makefile.am @@ -51,7 +51,7 @@ Xnest_LDFLAGS = AM_CFLAGS = -DHAVE_XNEST_CONFIG_H \ -DNO_HW_ONLY_EXTS \ - \ + $(DIX_CFLAGS) \ $(XNESTMODULES_CFLAGS) EXTRA_DIST = os2Stub.c \ diff --git a/mi/mieq.c b/mi/mieq.c index a7c6f9a51..a69ce7037 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -32,6 +32,10 @@ in this Software without prior written authorization from The Open Group. * */ +#if HAVE_DIX_CONFIG_H +#include +#endif + # define NEED_EVENTS # include # include From a0179281a6522ec59830e8f2549633741bc56e10 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 6 Sep 2006 15:45:48 -0700 Subject: [PATCH 16/17] Remove prototypes for non-existant functions. --- GL/glx/glxutil.h | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/GL/glx/glxutil.h b/GL/glx/glxutil.h index c30a1f9cd..1937ef2cf 100644 --- a/GL/glx/glxutil.h +++ b/GL/glx/glxutil.h @@ -40,36 +40,18 @@ ** */ -extern void __glXNop(void); - /* relate contexts with drawables */ extern void __glXAssociateContext(__GLXcontext *glxc); extern void __glXDeassociateContext(__GLXcontext *glxc); -/* drawable operation */ -extern void __glXGetDrawableSize(__GLdrawablePrivate *glPriv, - GLint *x, GLint *y, - GLuint *width, GLuint *height); -extern GLboolean __glXResizeDrawable(__GLdrawablePrivate *glPriv); -extern GLboolean __glXResizeDrawableBuffers(__GLXdrawable *glxPriv); - /* drawable management */ extern void __glXRefDrawable(__GLXdrawable *glxPriv); extern void __glXUnrefDrawable(__GLXdrawable *glxPriv); -extern __GLXdrawable *__glXCreateDrawable(__GLXscreen *screen, - DrawablePtr pDraw, XID drawId, - __GLcontextModes *modes); extern GLboolean __glXDrawableInit(__GLXdrawable *drawable, __GLXscreen *screen, DrawablePtr pDraw, XID drawID, __GLcontextModes *modes); -extern GLboolean __glXDestroyDrawable(__GLXdrawable *glxPriv); -extern __GLXdrawable *__glXFindDrawable(XID glxpixmapId); -extern __GLXdrawable *__glXGetDrawable(__GLXcontext *ctx, - DrawablePtr pDraw, - XID glxpixmapId); -extern void __glXCacheDrawableSize(__GLXdrawable *glxPriv); /* context helper routines */ extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag); @@ -79,4 +61,3 @@ extern void *__glXglDDXScreenInfo(void); extern void *__glXglDDXExtensionInfo(void); #endif /* _glxcmds_h_ */ - From 64479fffa22581cc7d753065c33eda5520b7db9a Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 6 Sep 2006 16:13:21 -0700 Subject: [PATCH 17/17] Remove prototypes and externs for non-existant functions and variables. --- GL/glx/glxext.h | 5 ----- GL/glx/glxserver.h | 3 --- 2 files changed, 8 deletions(-) diff --git a/GL/glx/glxext.h b/GL/glx/glxext.h index d7082086b..edd66a8f0 100644 --- a/GL/glx/glxext.h +++ b/GL/glx/glxext.h @@ -71,9 +71,6 @@ extern void __glXClearErrorOccured(void); extern GLboolean __glXErrorOccured(void); extern void __glXResetLargeCommandStatus(__GLXclientState*); -extern int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc); -extern int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc); - extern int DoMakeCurrent( __GLXclientState *cl, GLXDrawable drawId, GLXDrawable readId, GLXContextID contextId, GLXContextTag tag ); extern int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen, @@ -93,8 +90,6 @@ extern int DoRenderLarge(__GLXclientState *cl, GLbyte *pc, int do_swap); extern void GlxExtensionInit(void); -extern Bool __glXCoreType(void); - extern const char GLServerVersion[]; extern int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap); diff --git a/GL/glx/glxserver.h b/GL/glx/glxserver.h index a79520e4a..838973731 100644 --- a/GL/glx/glxserver.h +++ b/GL/glx/glxserver.h @@ -191,7 +191,6 @@ typedef int (*__GLXdispatchVendorPrivProcPtr)(__GLXclientState *, GLbyte *); * Dispatch for GLX commands. */ typedef int (*__GLXprocPtr)(__GLXclientState *, char *pc); -extern __GLXprocPtr __glXProcTable[]; /* * Tables for computing the size of each rendering command. @@ -252,6 +251,4 @@ extern int __glXImageSize(GLenum format, GLenum type, GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows, GLint alignment); -extern int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap); - #endif /* !__GLX_server_h__ */