diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 339fbe04e..44d9cf9e4 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 \ @@ -75,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 new file mode 100644 index 000000000..a4b202af3 --- /dev/null +++ b/GL/glx/extension_string.c @@ -0,0 +1,165 @@ +/* + * (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 support forced 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), Y, }, + { 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(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/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 fa7f1ddc8..41e49e225 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 { @@ -145,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) { @@ -169,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); @@ -186,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, @@ -586,8 +602,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 +841,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"); @@ -832,8 +862,13 @@ __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); + screen->driScreen.screenConfigs = screen; + + /* DRI protocol version. */ dri_version.major = XF86DRI_MAJOR_VERSION; dri_version.minor = XF86DRI_MINOR_VERSION; @@ -977,6 +1012,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); 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..edd66a8f0 100644 --- a/GL/glx/glxext.h +++ b/GL/glx/glxext.h @@ -66,15 +66,11 @@ 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); 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, @@ -94,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/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/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__ */ 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_ */ - 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.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_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..d13e4f8df 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, }; @@ -1532,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}, 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); +} 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/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" 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 50353ede4..8aa6a3424 100644 --- a/configure.ac +++ b/configure.ac @@ -420,6 +420,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: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto]) AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto]) 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]) @@ -710,6 +712,14 @@ if test "x$BUILTIN_FONTS" = xyes; then AC_DEFINE(NOFONTSERVERACCESS, 1, [Avoid using a font server]) 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' @@ -1461,7 +1471,6 @@ AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes]) dnl kdrive DDX -dnl utterly incomplete yet XEYPHR_LIBS= XEPHYR_INCS= @@ -1495,6 +1504,7 @@ if test "$KDRIVE" = yes; then fi # tslib... +<<<<<<< HEAD/configure.ac AC_CHECK_LIB(ts, ts_open, [HAVE_TSLIB="yes"]) if test "x$TSLIB" = xauto && test "x$HAVE_TSLIB" = xyes; then TSLIB=yes @@ -1528,6 +1538,13 @@ if test "$KDRIVE" = yes; then AC_CHECK_FUNC([nanosleep], [], AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) XEPHYR_LIBS="$XEPHYR_LIBS $XSERVER_LIBS" + 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' @@ -1535,7 +1552,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 \ @@ -1554,6 +1571,12 @@ if test "$KDRIVE" = yes; then AC_CHECK_FUNC([nanosleep], [], AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) + # check for SDL SDK + AC_CHECK_HEADERS([SDL/SDL.h]) + if test "x$XSDL" = xauto; then + XSDL="$ac_cv_header_SDL_SDL_h" + fi + AC_SUBST([XEPHYR_LIBS]) AC_SUBST([XEPHYR_INCS]) AC_SUBST([XSDL_LIBS]) @@ -1564,7 +1587,7 @@ AC_SUBST([KDRIVE_PURE_INCS]) AC_SUBST([KDRIVE_CFLAGS]) AC_SUBST([KDRIVE_PURE_LIBS]) AC_SUBST([KDRIVE_LIBS]) -AM_CONDITIONAL(TSLIB, [test "x$TSLIB" = xyes]) +AM_CONDITIONAL(TSLIB, [test "x$HAVE_TSLIB" = xyes]) AM_CONDITIONAL(H3600_TS, false) AM_CONDITIONAL(KDRIVEVESA, [test "x$KDRIVEVESA" = xyes]) AM_CONDITIONAL(KDRIVEFBDEV, [test "x$XFBDEV" = xyes]) @@ -1572,7 +1595,8 @@ AM_CONDITIONAL(XSDLSERVER, [test x"$XSDL" = xyes]) AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes]) AM_CONDITIONAL(BUILD_KDRIVEFBDEVLIB, [test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes]) AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes]) - +AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes]) +AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes]) dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers) AC_DEFINE(__XKBDEFRULES__, "xorg", [Default XKB rules]) 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) { 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/kdrive/ati/Makefile.am b/hw/kdrive/ati/Makefile.am index 94d525e47..76635fb52 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,5 +61,4 @@ ATI_LIBS = \ Xati_LDADD = \ $(ATI_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am index 146c1df9d..2f8a88da0 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,13 +15,12 @@ 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@ diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am index b8f12c5f3..c201fe9d6 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 = \ @@ -33,5 +28,4 @@ Xephyr_LDADD = \ libxephyr-hostx.a \ ../../../exa/libexa.la \ @KDRIVE_LIBS@ \ - $(TSLIB_LIBS) \ @XEPHYR_LIBS@ diff --git a/hw/kdrive/epson/Makefile.am b/hw/kdrive/epson/Makefile.am index 1a24d4382..a5bc70b02 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,7 +21,6 @@ EPSON_LIBS = \ @KDRIVE_LIBS@ Xepson_LDADD = \ - $(EPSON_LIBS) \ + $(EPSON_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ diff --git a/hw/kdrive/fake/Makefile.am b/hw/kdrive/fake/Makefile.am index a9c9affcd..d7ebfc243 100644 --- a/hw/kdrive/fake/Makefile.am +++ b/hw/kdrive/fake/Makefile.am @@ -6,10 +6,6 @@ noinst_LIBRARIES = libfake.a bin_PROGRAMS = Xfake -if TSLIB -TSLIB_FLAG = -lts -endif - libfake_a_SOURCES = \ fake.c \ kbd.c \ @@ -23,6 +19,4 @@ Xfake_SOURCES = \ Xfake_LDADD = \ libfake.a \ @KDRIVE_LIBS@ \ - @KDRIVE_LIBS@ \ - $(TSLIB_FLAG) \ @XSERVER_LIBS@ diff --git a/hw/kdrive/fbdev/Makefile.am b/hw/kdrive/fbdev/Makefile.am index deed3c9bd..cb7180184 100644 --- a/hw/kdrive/fbdev/Makefile.am +++ b/hw/kdrive/fbdev/Makefile.am @@ -4,10 +4,6 @@ INCLUDES = \ noinst_LIBRARIES = libfbdev.a -if TSLIB -TSLIB_FLAG = -lts -endif - libfbdev_a_SOURCES = \ fbdev.c \ fbdev.h @@ -21,6 +17,5 @@ Xfbdev_SOURCES = \ Xfbdev_LDADD = \ libfbdev.a \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ endif diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index 8ff32efcb..598d0ceaf 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -33,16 +33,24 @@ extern int KdTsPhyScreen; +char *fbdevDevicePath = NULL; + Bool 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 9d7c492d9..3b78c9735 100644 --- a/hw/kdrive/fbdev/fbinit.c +++ b/hw/kdrive/fbdev/fbinit.c @@ -62,15 +62,28 @@ 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); +} KdCardFuncs fbdevFuncs = { diff --git a/hw/kdrive/i810/Makefile.am b/hw/kdrive/i810/Makefile.am index 5f7b2acb9..503958571 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,5 +26,4 @@ I810_LIBS = \ Xi810_LDADD = \ $(I810_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ diff --git a/hw/kdrive/mach64/Makefile.am b/hw/kdrive/mach64/Makefile.am index 3040a89b8..67712e262 100644 --- a/hw/kdrive/mach64/Makefile.am +++ b/hw/kdrive/mach64/Makefile.am @@ -30,5 +30,4 @@ MACH64_LIBS = \ Xmach64_LDADD = \ $(MACH64_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ diff --git a/hw/kdrive/mga/Makefile.am b/hw/kdrive/mga/Makefile.am index 7853cba70..ee0798915 100644 --- a/hw/kdrive/mga/Makefile.am +++ b/hw/kdrive/mga/Makefile.am @@ -7,10 +7,6 @@ bin_PROGRAMS = Xmga noinst_LIBRARIES = libmga.a -if TSLIB -TSLIB_FLAG = -lts -endif - libmga_a_SOURCES = \ mgadraw.c \ g400_composite.c \ @@ -29,5 +25,4 @@ MGA_LIBS = \ Xmga_LDADD = \ $(MGA_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ diff --git a/hw/kdrive/neomagic/Makefile.am b/hw/kdrive/neomagic/Makefile.am index 8b8db6a4b..9a1af990c 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,5 +37,4 @@ NEOMAGIC_LIBS = \ Xneomagic_LDADD = \ $(NEOMAGIC_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ diff --git a/hw/kdrive/nvidia/Makefile.am b/hw/kdrive/nvidia/Makefile.am index 848b4cc10..67eff6961 100644 --- a/hw/kdrive/nvidia/Makefile.am +++ b/hw/kdrive/nvidia/Makefile.am @@ -7,10 +7,6 @@ bin_PROGRAMS = Xnvidia noinst_LIBRARIES = libnvidia.a -if TSLIB -TSLIB_FLAG = -lts -endif - # nvidiavideo.c libnvidia_a_SOURCES = \ @@ -30,5 +26,4 @@ NVIDIA_LIBS = \ Xnvidia_LDADD = \ $(NVIDIA_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ diff --git a/hw/kdrive/pm2/Makefile.am b/hw/kdrive/pm2/Makefile.am index 7ca2936a8..a7b0f0088 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,5 +24,4 @@ PM2_LIBS = \ Xpm2_LDADD = \ $(PM2_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ diff --git a/hw/kdrive/r128/Makefile.am b/hw/kdrive/r128/Makefile.am index 5d783ee50..eab80cce0 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,5 +23,4 @@ R128_LIBS = \ Xr128_LDADD = \ $(R128_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ diff --git a/hw/kdrive/sdl/Makefile.am b/hw/kdrive/sdl/Makefile.am index cc3873ca8..f5abb86e8 100644 --- a/hw/kdrive/sdl/Makefile.am +++ b/hw/kdrive/sdl/Makefile.am @@ -5,14 +5,9 @@ INCLUDES = \ bin_PROGRAMS = Xsdl -if TSLIB -TSLIB_FLAG = -lts -endif - Xsdl_SOURCES = sdl.c Xsdl_LDADD = @KDRIVE_PURE_LIBS@ \ @KDRIVE_LIBS@ \ @XSERVER_LIBS@ \ - $(TSLIB_FLAG) \ @XSDL_LIBS@ diff --git a/hw/kdrive/sis300/Makefile.am b/hw/kdrive/sis300/Makefile.am index e7200a2f6..98020745c 100644 --- a/hw/kdrive/sis300/Makefile.am +++ b/hw/kdrive/sis300/Makefile.am @@ -17,10 +17,6 @@ INCLUDES = \ bin_PROGRAMS = Xsis -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libsis.a libsis_a_SOURCES = \ diff --git a/hw/kdrive/smi/Makefile.am b/hw/kdrive/smi/Makefile.am index 8ce3ebae6..0fd9729fc 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,5 +28,4 @@ SMI_LIBS = \ Xsmi_LDADD = \ $(SMI_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ diff --git a/hw/kdrive/vesa/Makefile.am b/hw/kdrive/vesa/Makefile.am index 8f36ddf0b..54a6f47ee 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 \ @@ -27,6 +22,4 @@ Xvesa_SOURCES = \ Xvesa_LDADD = \ libvesa.a \ @KDRIVE_LIBS@ \ - @KDRIVE_LIBS@ \ - $(TSLIB_FLAG) \ @XSERVER_LIBS@ diff --git a/hw/kdrive/via/Makefile.am b/hw/kdrive/via/Makefile.am index 6e2045a50..0ea88816a 100644 --- a/hw/kdrive/via/Makefile.am +++ b/hw/kdrive/via/Makefile.am @@ -5,10 +5,6 @@ INCLUDES = \ bin_PROGRAMS = Xvia -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libvia.a libvia_a_SOURCES = \ @@ -28,5 +24,4 @@ VIA_LIBS = \ Xvia_LDADD = \ $(VIA_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) + @XSERVER_LIBS@ 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 3d44ee744..aec237105 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