diff options
author | Ian Romanick <idr@umwelt.(none)> | 2006-08-23 13:30:13 -0700 |
---|---|---|
committer | Ian Romanick <idr@umwelt.(none)> | 2006-08-23 13:30:13 -0700 |
commit | d7a7f12361d31001bbd9394a57de029ef0b934b8 (patch) | |
tree | 77897e930a8d1e48e8f1c5a7b55ddc71e0a9ad82 /GL | |
parent | db82e12fac5eaa16a39fc1bd0bc31ad95089dc95 (diff) |
Convert protocol decode tables for Single, VendorPrivate, and
VendorPrivateWithReply message to use nice, compact N-way search trees
generated by scripts in Mesa.
The Render protocol decode tables are next...
Diffstat (limited to 'GL')
-rw-r--r-- | GL/glx/Makefile.am | 2 | ||||
-rw-r--r-- | GL/glx/g_disptab.c | 325 | ||||
-rw-r--r-- | GL/glx/g_disptab.h | 98 | ||||
-rw-r--r-- | GL/glx/g_disptab_EXT.c | 13 | ||||
-rw-r--r-- | GL/glx/g_disptab_EXT.h | 5 | ||||
-rw-r--r-- | GL/glx/glxcmds.c | 210 | ||||
-rw-r--r-- | GL/glx/glxcmdsswap.c | 197 | ||||
-rw-r--r-- | GL/glx/glxext.c | 39 | ||||
-rw-r--r-- | GL/glx/glxext.h | 1 | ||||
-rw-r--r-- | GL/glx/glxserver.h | 4 | ||||
-rw-r--r-- | GL/glx/indirect_dispatch.h | 174 | ||||
-rw-r--r-- | GL/glx/indirect_table.c | 509 | ||||
-rw-r--r-- | GL/glx/indirect_table.h | 106 | ||||
-rw-r--r-- | GL/glx/indirect_util.c | 111 | ||||
-rw-r--r-- | GL/glx/indirect_util.h | 10 | ||||
-rw-r--r-- | GL/glx/single2.c | 10 | ||||
-rw-r--r-- | GL/glx/single2swap.c | 10 | ||||
-rw-r--r-- | GL/glx/singlepix.c | 5 | ||||
-rw-r--r-- | GL/glx/singlepixswap.c | 5 | ||||
-rw-r--r-- | GL/glx/xfont.c | 3 |
20 files changed, 1076 insertions, 761 deletions
diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 1d4a9865d..2bb694345 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -61,6 +61,8 @@ libglx_la_SOURCES = \ indirect_reqsize.h \ indirect_size_get.c \ indirect_size_get.h \ + indirect_table.c \ + indirect_table.h \ indirect_util.c \ indirect_util.h \ render2.c \ diff --git a/GL/glx/g_disptab.c b/GL/glx/g_disptab.c index 8e336268d..60193018b 100644 --- a/GL/glx/g_disptab.c +++ b/GL/glx/g_disptab.c @@ -37,169 +37,6 @@ #include "g_disptab.h" #include "indirect_dispatch.h" -__GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE] = { - __glXNoSuchSingleOpcode, - __glXRender, - __glXRenderLarge, - __glXCreateContext, - __glXDestroyContext, - __glXMakeCurrent, - __glXIsDirect, - __glXQueryVersion, - __glXWaitGL, /* 0x08 */ - __glXWaitX, - __glXCopyContext, - __glXSwapBuffers, - __glXUseXFont, - __glXCreateGLXPixmap, - __glXGetVisualConfigs, - __glXDestroyGLXPixmap, - __glXVendorPrivate, /* 0x10 */ - __glXVendorPrivateWithReply, - __glXQueryExtensionsString, - __glXQueryServerString, - __glXClientInfo, - __glXGetFBConfigs, - __glXCreatePixmap, - __glXDestroyPixmap, - __glXCreateNewContext, /* 0x18 */ - __glXQueryContext, - __glXMakeContextCurrent, - __glXCreatePbuffer, - __glXDestroyPbuffer, - __glXGetDrawableAttributes, - __glXChangeDrawableAttributes, - __glXCreateWindow, - __glXDestroyWindow, /* 0x20 */ - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXDisp_NewList, - __glXDisp_EndList, - __glXDisp_DeleteLists, - __glXDisp_GenLists, - __glXDisp_FeedbackBuffer, - __glXDisp_SelectBuffer, - __glXDisp_RenderMode, - __glXDisp_Finish, - __glXDisp_PixelStoref, - __glXDisp_PixelStorei, - __glXDisp_ReadPixels, - __glXDisp_GetBooleanv, - __glXDisp_GetClipPlane, - __glXDisp_GetDoublev, - __glXDisp_GetError, - __glXDisp_GetFloatv, - __glXDisp_GetIntegerv, - __glXDisp_GetLightfv, - __glXDisp_GetLightiv, - __glXDisp_GetMapdv, - __glXDisp_GetMapfv, - __glXDisp_GetMapiv, - __glXDisp_GetMaterialfv, - __glXDisp_GetMaterialiv, - __glXDisp_GetPixelMapfv, - __glXDisp_GetPixelMapuiv, - __glXDisp_GetPixelMapusv, - __glXDisp_GetPolygonStipple, - __glXDisp_GetString, - __glXDisp_GetTexEnvfv, - __glXDisp_GetTexEnviv, - __glXDisp_GetTexGendv, - __glXDisp_GetTexGenfv, - __glXDisp_GetTexGeniv, - __glXDisp_GetTexImage, - __glXDisp_GetTexParameterfv, - __glXDisp_GetTexParameteriv, - __glXDisp_GetTexLevelParameterfv, - __glXDisp_GetTexLevelParameteriv, - __glXDisp_IsEnabled, - __glXDisp_IsList, - __glXDisp_Flush, - __glXDisp_AreTexturesResident, - __glXDisp_DeleteTextures, - __glXDisp_GenTextures, - __glXDisp_IsTexture, - __glXDisp_GetColorTable, - __glXDisp_GetColorTableParameterfv, - __glXDisp_GetColorTableParameteriv, - __glXDisp_GetConvolutionFilter, - __glXDisp_GetConvolutionParameterfv, - __glXDisp_GetConvolutionParameteriv, - __glXDisp_GetSeparableFilter, - __glXDisp_GetHistogram, - __glXDisp_GetHistogramParameterfv, - __glXDisp_GetHistogramParameteriv, - __glXDisp_GetMinmax, - __glXDisp_GetMinmaxParameterfv, - __glXDisp_GetMinmaxParameteriv, -}; - __GLXdispatchRenderProcPtr __glXRenderTable[] = { __glXNoSuchRenderOpcode, __glXDisp_CallList, @@ -438,168 +275,6 @@ __GLXdispatchRenderProcPtr __glXRenderTable[] = { #endif }; -__GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE] = { - __glXNoSuchSingleOpcode, - __glXSwapRender, - __glXSwapRenderLarge, - __glXSwapCreateContext, - __glXSwapDestroyContext, - __glXSwapMakeCurrent, - __glXSwapIsDirect, - __glXSwapQueryVersion, - __glXSwapWaitGL, /* 0x08 */ - __glXSwapWaitX, - __glXSwapCopyContext, - __glXSwapSwapBuffers, - __glXSwapUseXFont, - __glXSwapCreateGLXPixmap, - __glXSwapGetVisualConfigs, - __glXSwapDestroyGLXPixmap, - __glXSwapVendorPrivate, /* 0x10 */ - __glXSwapVendorPrivateWithReply, - __glXSwapQueryExtensionsString, - __glXSwapQueryServerString, - __glXSwapClientInfo, - __glXSwapGetFBConfigs, - __glXSwapCreatePixmap, - __glXSwapDestroyPixmap, - __glXSwapCreateNewContext, /* 0x18 */ - __glXSwapQueryContext, - __glXSwapMakeContextCurrent, - __glXSwapCreatePbuffer, - __glXSwapDestroyPbuffer, - __glXSwapGetDrawableAttributes, - __glXSwapChangeDrawableAttributes, - __glXSwapCreateWindow, - __glXSwapDestroyWindow, /* 0x20 */ - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXNoSuchSingleOpcode, - __glXDispSwap_NewList, - __glXDispSwap_EndList, - __glXDispSwap_DeleteLists, - __glXDispSwap_GenLists, - __glXDispSwap_FeedbackBuffer, - __glXDispSwap_SelectBuffer, - __glXDispSwap_RenderMode, - __glXDispSwap_Finish, - __glXDispSwap_PixelStoref, - __glXDispSwap_PixelStorei, - __glXDispSwap_ReadPixels, - __glXDispSwap_GetBooleanv, - __glXDispSwap_GetClipPlane, - __glXDispSwap_GetDoublev, - __glXDispSwap_GetError, - __glXDispSwap_GetFloatv, - __glXDispSwap_GetIntegerv, - __glXDispSwap_GetLightfv, - __glXDispSwap_GetLightiv, - __glXDispSwap_GetMapdv, - __glXDispSwap_GetMapfv, - __glXDispSwap_GetMapiv, - __glXDispSwap_GetMaterialfv, - __glXDispSwap_GetMaterialiv, - __glXDispSwap_GetPixelMapfv, - __glXDispSwap_GetPixelMapuiv, - __glXDispSwap_GetPixelMapusv, - __glXDispSwap_GetPolygonStipple, - __glXDispSwap_GetString, - __glXDispSwap_GetTexEnvfv, - __glXDispSwap_GetTexEnviv, - __glXDispSwap_GetTexGendv, - __glXDispSwap_GetTexGenfv, - __glXDispSwap_GetTexGeniv, - __glXDispSwap_GetTexImage, - __glXDispSwap_GetTexParameterfv, - __glXDispSwap_GetTexParameteriv, - __glXDispSwap_GetTexLevelParameterfv, - __glXDispSwap_GetTexLevelParameteriv, - __glXDispSwap_IsEnabled, - __glXDispSwap_IsList, - __glXDispSwap_Flush, - __glXDispSwap_AreTexturesResident, - __glXDispSwap_DeleteTextures, - __glXDispSwap_GenTextures, - __glXDispSwap_IsTexture, - __glXDispSwap_GetColorTable, - __glXDispSwap_GetColorTableParameterfv, - __glXDispSwap_GetColorTableParameteriv, - __glXDispSwap_GetConvolutionFilter, - __glXDispSwap_GetConvolutionParameterfv, - __glXDispSwap_GetConvolutionParameteriv, - __glXDispSwap_GetSeparableFilter, - __glXDispSwap_GetHistogram, - __glXDispSwap_GetHistogramParameterfv, - __glXDispSwap_GetHistogramParameteriv, - __glXDispSwap_GetMinmax, - __glXDispSwap_GetMinmaxParameterfv, - __glXDispSwap_GetMinmaxParameteriv, -}; __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE] = { __glXNoSuchRenderOpcode, diff --git a/GL/glx/g_disptab.h b/GL/glx/g_disptab.h index 4a1c5e975..5ee242ff0 100644 --- a/GL/glx/g_disptab.h +++ b/GL/glx/g_disptab.h @@ -34,97 +34,33 @@ ** version 1.2.1 Specification. */ -extern int __glXRender(__GLXclientState*, GLbyte*); -extern int __glXRenderLarge(__GLXclientState*, GLbyte*); -extern int __glXCreateContext(__GLXclientState*, GLbyte*); -extern int __glXDestroyContext(__GLXclientState*, GLbyte*); -extern int __glXMakeCurrent(__GLXclientState*, GLbyte*); -extern int __glXIsDirect(__GLXclientState*, GLbyte*); -extern int __glXQueryVersion(__GLXclientState*, GLbyte*); -extern int __glXWaitGL(__GLXclientState*, GLbyte*); -extern int __glXWaitX(__GLXclientState*, GLbyte*); -extern int __glXCopyContext(__GLXclientState*, GLbyte*); -extern int __glXSwapBuffers(__GLXclientState*, GLbyte*); -extern int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc); -extern int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc); -extern int __glXCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc); -extern int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc); -extern int __glXUseXFont(__GLXclientState*, GLbyte*); -extern int __glXCreateGLXPixmap(__GLXclientState*, GLbyte*); -extern int __glXGetVisualConfigs(__GLXclientState*, GLbyte*); -extern int __glXDestroyGLXPixmap(__GLXclientState*, GLbyte*); -extern int __glXVendorPrivate(__GLXclientState*, GLbyte*); -extern int __glXVendorPrivateWithReply(__GLXclientState*, GLbyte*); -extern int __glXQueryExtensionsString(__GLXclientState*, GLbyte*); -extern int __glXQueryServerString(__GLXclientState*, GLbyte*); -extern int __glXClientInfo(__GLXclientState*, GLbyte*); -extern int __glXMakeContextCurrent(__GLXclientState*, GLbyte*); -extern int __glXGetFBConfigs(__GLXclientState*, GLbyte*); -extern int __glXCreatePixmap(__GLXclientState*, GLbyte*); -extern int __glXDestroyPixmap(__GLXclientState*, GLbyte*); -extern int __glXCreateNewContext(__GLXclientState*, GLbyte*); -extern int __glXQueryContext(__GLXclientState*, GLbyte*); -extern int __glXMakeContextCurrent(__GLXclientState*, GLbyte*); -extern int __glXCreatePbuffer(__GLXclientState*, GLbyte*); -extern int __glXDestroyPbuffer(__GLXclientState*, GLbyte*); -extern int __glXGetDrawableAttributes(__GLXclientState*, GLbyte*); -extern int __glXChangeDrawableAttributes(__GLXclientState*, GLbyte*); -extern int __glXCreateWindow(__GLXclientState*, GLbyte*); -extern int __glXDestroyWindow(__GLXclientState*, GLbyte*); +extern int __glXDisp_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); + +extern int __glXDispSwap_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXDispSwap_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); -extern int __glXSwapRender(__GLXclientState*, GLbyte*); -extern int __glXSwapRenderLarge(__GLXclientState*, GLbyte*); -extern int __glXSwapCreateContext(__GLXclientState*, GLbyte*); -extern int __glXSwapDestroyContext(__GLXclientState*, GLbyte*); -extern int __glXSwapMakeCurrent(__GLXclientState*, GLbyte*); -extern int __glXSwapIsDirect(__GLXclientState*, GLbyte*); -extern int __glXSwapQueryVersion(__GLXclientState*, GLbyte*); -extern int __glXSwapWaitGL(__GLXclientState*, GLbyte*); -extern int __glXSwapWaitX(__GLXclientState*, GLbyte*); -extern int __glXSwapCopyContext(__GLXclientState*, GLbyte*); -extern int __glXSwapSwapBuffers(__GLXclientState*, GLbyte*); -extern int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc); -extern int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc); -extern int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc); -extern int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc); -extern int __glXSwapUseXFont(__GLXclientState*, GLbyte*); -extern int __glXSwapCreateGLXPixmap(__GLXclientState*, GLbyte*); -extern int __glXSwapGetVisualConfigs(__GLXclientState*, GLbyte*); -extern int __glXSwapDestroyGLXPixmap(__GLXclientState*, GLbyte*); -extern int __glXSwapVendorPrivate(__GLXclientState*, GLbyte*); -extern int __glXSwapVendorPrivateWithReply(__GLXclientState*, GLbyte*); -extern int __glXSwapQueryExtensionsString(__GLXclientState*, GLbyte*); -extern int __glXSwapQueryServerString(__GLXclientState*, GLbyte*); -extern int __glXSwapClientInfo(__GLXclientState*, GLbyte*); -extern int __glXSwapMakeContextCurrent(__GLXclientState*, GLbyte*); -extern int __glXSwapGetFBConfigs(__GLXclientState*, GLbyte*); -extern int __glXSwapCreatePixmap(__GLXclientState*, GLbyte*); -extern int __glXSwapDestroyPixmap(__GLXclientState*, GLbyte*); -extern int __glXSwapCreateNewContext(__GLXclientState*, GLbyte*); -extern int __glXSwapQueryContext(__GLXclientState*, GLbyte*); -extern int __glXSwapMakeContextCurrent(__GLXclientState*, GLbyte*); -extern int __glXSwapCreatePbuffer(__GLXclientState*, GLbyte*); -extern int __glXSwapDestroyPbuffer(__GLXclientState*, GLbyte*); -extern int __glXSwapGetDrawableAttributes(__GLXclientState*, GLbyte*); -extern int __glXSwapChangeDrawableAttributes(__GLXclientState*, GLbyte*); -extern int __glXSwapCreateWindow(__GLXclientState*, GLbyte*); -extern int __glXSwapDestroyWindow(__GLXclientState*, GLbyte*); #define __GLX_MIN_GLXCMD_OPCODE 1 #define __GLX_MAX_GLXCMD_OPCODE 20 #define __GLX_MIN_RENDER_OPCODE 1 -/*#define __GLX_MAX_RENDER_OPCODE 213*/ #define __GLX_MAX_RENDER_OPCODE 230 -#define __GLX_MIN_SINGLE_OPCODE 1 -#define __GLX_MAX_SINGLE_OPCODE 159 -#define __GLX_SINGLE_TABLE_SIZE 160 -/*#define __GLX_RENDER_TABLE_SIZE 214*/ #define __GLX_RENDER_TABLE_SIZE 231 extern __GLXdispatchRenderProcPtr __glXRenderTable[__GLX_RENDER_TABLE_SIZE]; -extern __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE]; extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE]; -extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE]; /* Copied from mesa src/glx/x11/glxcmds.c * diff --git a/GL/glx/g_disptab_EXT.c b/GL/glx/g_disptab_EXT.c index 087fb2472..9c171ac5d 100644 --- a/GL/glx/g_disptab_EXT.c +++ b/GL/glx/g_disptab_EXT.c @@ -2338,12 +2338,6 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __ __glXDisp_FramebufferRenderbufferEXT, /* 4324 */ __glXDisp_GenerateMipmapEXT /* 4325 */ }; -__GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = { - __glXDisp_AreTexturesResidentEXT, /* 11 */ - __glXDisp_DeleteTextures, /* 12 */ - __glXDisp_GenTexturesEXT, /* 13 */ - __glXDisp_IsTextureEXT, /* 14 */ -}; __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = { @@ -4647,10 +4641,3 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT __glXDispSwap_FramebufferRenderbufferEXT, /* 4324 */ __glXDispSwap_GenerateMipmapEXT /* 4325 */ }; -__GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = { - __glXDispSwap_AreTexturesResidentEXT, /* 11 */ - __glXDispSwap_DeleteTextures, /* 12 */ - __glXDispSwap_GenTexturesEXT, /* 13 */ - __glXDispSwap_IsTextureEXT, /* 14 */ -}; - diff --git a/GL/glx/g_disptab_EXT.h b/GL/glx/g_disptab_EXT.h index 62a7517c4..0b59171b5 100644 --- a/GL/glx/g_disptab_EXT.h +++ b/GL/glx/g_disptab_EXT.h @@ -36,12 +36,7 @@ #define __GLX_MIN_RENDER_OPCODE_EXT 2053 #define __GLX_MAX_RENDER_OPCODE_EXT 4325 -#define __GLX_MIN_VENDPRIV_OPCODE_EXT 11 -#define __GLX_MAX_VENDPRIV_OPCODE_EXT 14 -#define __GLX_VENDPRIV_TABLE_SIZE_EXT (__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1) #define __GLX_RENDER_TABLE_SIZE_EXT (__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1) extern __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_RENDER_TABLE_SIZE_EXT]; -extern __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[__GLX_VENDPRIV_TABLE_SIZE_EXT]; extern __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_RENDER_TABLE_SIZE_EXT]; -extern __GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[__GLX_VENDPRIV_TABLE_SIZE_EXT]; #endif /* _GLX_g_disptab_EXT_h_ */ diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c index f0a6474c1..b52528dd4 100644 --- a/GL/glx/glxcmds.c +++ b/GL/glx/glxcmds.c @@ -57,6 +57,8 @@ #include "glthread.h" #include "dispatch.h" #include "indirect_dispatch.h" +#include "indirect_table.h" +#include "indirect_util.h" /************************************************************************/ @@ -66,18 +68,6 @@ GlxSetRenderTables (struct _glapi_table *table) _glapi_set_dispatch (table); } -static int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc); - -static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glxQueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glxDestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc); -static int __glxQueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); - /************************************************************************/ @@ -254,7 +244,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId, } -int __glXCreateContext(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateContext(__GLXclientState *cl, GLbyte *pc) { xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc; return DoCreateContext( cl, req->context, req->shareList, req->visual, @@ -262,7 +252,7 @@ int __glXCreateContext(__GLXclientState *cl, GLbyte *pc) } -int __glXCreateNewContext(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateNewContext(__GLXclientState *cl, GLbyte *pc) { xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc; return DoCreateContext( cl, req->context, req->shareList, req->fbconfig, @@ -270,7 +260,7 @@ int __glXCreateNewContext(__GLXclientState *cl, GLbyte *pc) } -int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXCreateContextWithConfigSGIXReq *req = (xGLXCreateContextWithConfigSGIXReq *) pc; @@ -281,7 +271,7 @@ int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) /* ** Destroy a GL context as an X resource. */ -int __glXDestroyContext(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_DestroyContext(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; @@ -399,7 +389,7 @@ static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc) ** Make an OpenGL context and drawable current. */ -int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_MakeCurrent(__GLXclientState *cl, GLbyte *pc) { xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc; @@ -407,7 +397,7 @@ int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc) req->context, req->oldContextTag ); } -int __glXMakeContextCurrent(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_MakeContextCurrent(__GLXclientState *cl, GLbyte *pc) { xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc; @@ -415,7 +405,7 @@ int __glXMakeContextCurrent(__GLXclientState *cl, GLbyte *pc) req->context, req->oldContextTag ); } -int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_MakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc) { xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc; @@ -750,7 +740,7 @@ int DoMakeCurrent( __GLXclientState *cl, return Success; } -int __glXIsDirect(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_IsDirect(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; @@ -780,7 +770,7 @@ int __glXIsDirect(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryVersion(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; @@ -811,7 +801,7 @@ int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXWaitGL(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_WaitGL(__GLXclientState *cl, GLbyte *pc) { xGLXWaitGLReq *req = (xGLXWaitGLReq *)pc; int error; @@ -823,7 +813,7 @@ int __glXWaitGL(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXWaitX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_WaitX(__GLXclientState *cl, GLbyte *pc) { xGLXWaitXReq *req = (xGLXWaitXReq *)pc; int error; @@ -840,7 +830,7 @@ int __glXWaitX(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXCopyContext(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CopyContext(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc; @@ -1011,7 +1001,7 @@ int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen, return Success; } -int __glXGetVisualConfigs(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc) { xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc; return DoGetVisualConfigs( cl, req->screen, GL_FALSE ); @@ -1187,14 +1177,14 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap) } -int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetFBConfigs(__GLXclientState *cl, GLbyte *pc) { xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc; return DoGetFBConfigs( cl, req->screen, GL_FALSE ); } -int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc; return DoGetFBConfigs( cl, req->screen, GL_FALSE ); @@ -1290,21 +1280,21 @@ int DoCreateGLXPixmap(__GLXclientState *cl, XID fbconfigId, return Success; } -int __glXCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc) { xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc; return DoCreateGLXPixmap( cl, req->visual, req->screen, req->pixmap, req->glxpixmap ); } -int __glXCreatePixmap(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreatePixmap(__GLXclientState *cl, GLbyte *pc) { xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc; return DoCreateGLXPixmap( cl, req->fbconfig, req->screen, req->pixmap, req->glxpixmap ); } -int __glXCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXCreateGLXPixmapWithConfigSGIXReq *req = (xGLXCreateGLXPixmapWithConfigSGIXReq *) pc; @@ -1329,21 +1319,21 @@ int DoDestroyPixmap(__GLXclientState *cl, XID glxpixmap) return Success; } -int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_DestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) { xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; return DoDestroyPixmap(cl, req->glxpixmap); } -int __glXDestroyPixmap(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_DestroyPixmap(__GLXclientState *cl, GLbyte *pc) { xGLXDestroyPixmapReq *req = (xGLXDestroyPixmapReq *) pc; return DoDestroyPixmap(cl, req->glxpixmap); } -int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreatePbuffer(__GLXclientState *cl, GLbyte *pc) { xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc; @@ -1352,7 +1342,7 @@ int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc) return BadRequest; } -int __glXDestroyPbuffer(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc) { xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc; @@ -1361,7 +1351,7 @@ int __glXDestroyPbuffer(__GLXclientState *cl, GLbyte *pc) return BadRequest; } -int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_ChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) { xGLXChangeDrawableAttributesReq *req = (xGLXChangeDrawableAttributesReq *) pc; @@ -1371,7 +1361,7 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) return BadRequest; } -int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateWindow(__GLXclientState *cl, GLbyte *pc) { xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc; ClientPtr client = cl->client; @@ -1403,7 +1393,7 @@ int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXDestroyWindow(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_DestroyWindow(__GLXclientState *cl, GLbyte *pc) { xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc; ClientPtr client = cl->client; @@ -1428,7 +1418,7 @@ int __glXDestroyWindow(__GLXclientState *cl, GLbyte *pc) ** this time that is of value. Consequently, this code must be ** implemented by somebody other than SGI. */ -int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_SwapBuffers(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc; @@ -1518,21 +1508,21 @@ int DoQueryContext(__GLXclientState *cl, GLXContextID gcId) return Success; } -int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) { xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; return DoQueryContext(cl, req->context); } -int __glXQueryContext(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryContext(__GLXclientState *cl, GLbyte *pc) { xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc; return DoQueryContext(cl, req->context); } -int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_BindTexImageEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; ClientPtr client = cl->client; @@ -1568,7 +1558,7 @@ int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc) pGlxPixmap); } -int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_ReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; ClientPtr client = cl->client; @@ -1601,7 +1591,7 @@ int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) pGlxPixmap); } -int __glXCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; GLXContextTag tag = req->contextTag; @@ -1701,7 +1691,7 @@ DoGetDrawableAttributes(__GLXclientState *cl, XID drawId) return Success; } -int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc; CARD32 *data; @@ -1713,7 +1703,7 @@ int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) return DoGetDrawableAttributes(cl, drawable); } -int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) { xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc; @@ -1730,7 +1720,7 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) /* ** Execute all the drawing commands in a request. */ -int __glXRender(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_Render(__GLXclientState *cl, GLbyte *pc) { xGLXRenderReq *req; ClientPtr client= cl->client; @@ -1742,7 +1732,7 @@ int __glXRender(__GLXclientState *cl, GLbyte *pc) /* ** NOTE: much of this code also appears in the byteswapping version of this - ** routine, __glXSwapRender(). Any changes made here should also be + ** routine, __glXDisp_SwapRender(). Any changes made here should also be ** duplicated there. */ @@ -1832,7 +1822,7 @@ int __glXRender(__GLXclientState *cl, GLbyte *pc) /* ** Execute a large rendering request (one that spans multiple X requests). */ -int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_RenderLarge(__GLXclientState *cl, GLbyte *pc) { xGLXRenderLargeReq *req; ClientPtr client= cl->client; @@ -1845,7 +1835,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) /* ** NOTE: much of this code also appears in the byteswapping version of this - ** routine, __glXSwapRenderLarge(). Any changes made here should also be + ** routine, __glXDisp_SwapRenderLarge(). Any changes made here should also be ** duplicated there. */ @@ -2043,7 +2033,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) extern RESTYPE __glXSwapBarrierRes; -static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *) pc; @@ -2073,7 +2063,7 @@ static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) } -static int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryMaxSwapBarriersSGIXReq *req = @@ -2104,7 +2094,7 @@ static int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc) #define GLX_BAD_HYPERPIPE_SGIX 92 -static int __glxQueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryHyperpipeNetworkSGIXReq * req = (xGLXQueryHyperpipeNetworkSGIXReq *) pc; @@ -2144,7 +2134,7 @@ static int __glxQueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc) return Success; } -static int __glxDestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc) +int __glXDisp_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXDestroyHyperpipeConfigSGIXReq * req = @@ -2179,7 +2169,7 @@ static int __glxDestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc) return Success; } -static int __glxQueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryHyperpipeConfigSGIXReq * req = @@ -2223,7 +2213,7 @@ static int __glxQueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) return Success; } -static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXHyperpipeConfigSGIXReq * req = @@ -2274,40 +2264,21 @@ static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) ** allocating the entry points in the dispatch table. */ -int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_VendorPrivate(__GLXclientState *cl, GLbyte *pc) { - xGLXVendorPrivateReq *req; - GLint vendorcode; + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLint vendorcode = req->vendorCode; + __GLXdispatchVendorPrivProcPtr proc; - req = (xGLXVendorPrivateReq *) pc; - vendorcode = req->vendorCode; -#ifndef __DARWIN__ - switch( vendorcode ) { - case X_GLvop_SampleMaskSGIS: - CALL_SampleMaskSGIS( GET_DISPATCH(), - (*(GLfloat *)(pc + 4), *(GLboolean *)(pc + 8)) ); + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info, + vendorcode, 0); + if (proc != NULL) { + (*proc)(cl, (GLbyte*)req); return Success; - case X_GLvop_SamplePatternSGIS: - CALL_SamplePatternSGIS( GET_DISPATCH(), (*(GLenum *)(pc + 4)) ); - return Success; - case X_GLXvop_BindSwapBarrierSGIX: - return __glXBindSwapBarrierSGIX(cl, pc); - case X_GLXvop_BindTexImageEXT: - return __glXBindTexImageEXT(cl, pc); - case X_GLXvop_ReleaseTexImageEXT: - return __glXReleaseTexImageEXT(cl, pc); - case X_GLXvop_CopySubBufferMESA: - return __glXCopySubBufferMESA(cl, pc); } -#endif - if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && - (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { - (*__glXVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT]) - (cl, (GLbyte*)req); - return Success; - } /* ** This sample implemention does not support any private requests. */ @@ -2315,67 +2286,25 @@ int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc) return __glXError(GLXUnsupportedPrivateRequest); } -int __glXVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateWithReplyReq *req; - GLint vendorcode; - - req = (xGLXVendorPrivateWithReplyReq *) pc; - vendorcode = req->vendorCode; - - switch (vendorcode) { - case X_GLXvop_QueryContextInfoEXT: - return __glXQueryContextInfoEXT(cl, pc); - case X_GLXvop_MakeCurrentReadSGI: - return __glXMakeCurrentReadSGI(cl, pc); - case X_GLXvop_QueryMaxSwapBarriersSGIX: - return __glXQueryMaxSwapBarriersSGIX(cl, pc); - case X_GLXvop_QueryHyperpipeNetworkSGIX: - return __glxQueryHyperpipeNetworkSGIX(cl, pc); - case X_GLXvop_QueryHyperpipeConfigSGIX: - return __glxQueryHyperpipeConfigSGIX(cl, pc); - case X_GLXvop_DestroyHyperpipeConfigSGIX: - return __glxDestroyHyperpipeConfigSGIX(cl, pc); - case X_GLXvop_HyperpipeConfigSGIX: - return __glxHyperpipeConfigSGIX(cl, pc); - case X_GLXvop_GetFBConfigsSGIX: - return __glXGetFBConfigsSGIX(cl, pc); - case X_GLXvop_CreateContextWithConfigSGIX: - return __glXCreateContextWithConfigSGIX(cl, pc); - case X_GLXvop_CreateGLXPixmapWithConfigSGIX: - return __glXCreateGLXPixmapWithConfigSGIX(cl, pc); - case X_GLXvop_GetDrawableAttributesSGIX: - return __glXGetDrawableAttributesSGIX(cl, pc); - case X_GLvop_IsRenderbufferEXT: - return __glXDisp_IsRenderbufferEXT(cl, pc); - case X_GLvop_GenRenderbuffersEXT: - return __glXDisp_GenRenderbuffersEXT(cl, pc); - case X_GLvop_GetRenderbufferParameterivEXT: - return __glXDisp_GetRenderbufferParameterivEXT(cl, pc); - case X_GLvop_IsFramebufferEXT: - return __glXDisp_IsFramebufferEXT(cl, pc); - case X_GLvop_GenFramebuffersEXT: - return __glXDisp_GenFramebuffersEXT(cl, pc); - case X_GLvop_CheckFramebufferStatusEXT: - return __glXDisp_CheckFramebufferStatusEXT(cl, pc); - case X_GLvop_GetFramebufferAttachmentParameterivEXT: - return __glXDisp_GetFramebufferAttachmentParameterivEXT(cl, pc); - default: - break; - } - - if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && - (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { - return - (*__glXVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT]) - (cl, (GLbyte*)req); +int __glXDisp_VendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLint vendorcode = req->vendorCode; + __GLXdispatchVendorPrivProcPtr proc; + + + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info, + vendorcode, 0); + if (proc != NULL) { + return (*proc)(cl, (GLbyte*)req); } cl->client->errorValue = vendorcode; return __glXError(GLXUnsupportedPrivateRequest); } -int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryExtensionsString(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc; @@ -2420,7 +2349,7 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryServerString(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc; @@ -2478,7 +2407,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXClientInfo(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_ClientInfo(__GLXclientState *cl, GLbyte *pc) { xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc; const char *buf; @@ -2492,4 +2421,3 @@ int __glXClientInfo(__GLXclientState *cl, GLbyte *pc) return Success; } - diff --git a/GL/glx/glxcmdsswap.c b/GL/glx/glxcmdsswap.c index bb86243ca..78a26f5a8 100644 --- a/GL/glx/glxcmdsswap.c +++ b/GL/glx/glxcmdsswap.c @@ -54,11 +54,9 @@ #include "glthread.h" #include "dispatch.h" #include "indirect_dispatch.h" +#include "indirect_table.h" +#include "indirect_util.h" -static int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXSwapCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc); /************************************************************************/ @@ -69,7 +67,7 @@ static int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc); ** it is called at the end of the unswapped routine. */ -int __glXSwapCreateContext(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_CreateContext(__GLXclientState *cl, GLbyte *pc) { xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -84,7 +82,7 @@ int __glXSwapCreateContext(__GLXclientState *cl, GLbyte *pc) req->screen, req->isDirect ); } -int __glXSwapCreateNewContext(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_CreateNewContext(__GLXclientState *cl, GLbyte *pc) { xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -100,7 +98,7 @@ int __glXSwapCreateNewContext(__GLXclientState *cl, GLbyte *pc) req->screen, req->isDirect ); } -int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_CreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXCreateContextWithConfigSGIXReq *req = (xGLXCreateContextWithConfigSGIXReq *) pc; @@ -117,7 +115,7 @@ int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) req->screen, req->isDirect ); } -int __glXSwapDestroyContext(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_DestroyContext(__GLXclientState *cl, GLbyte *pc) { xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -125,10 +123,10 @@ int __glXSwapDestroyContext(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->context); - return __glXDestroyContext(cl, pc); + return __glXDisp_DestroyContext(cl, pc); } -int __glXSwapMakeCurrent(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_MakeCurrent(__GLXclientState *cl, GLbyte *pc) { xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -142,7 +140,7 @@ int __glXSwapMakeCurrent(__GLXclientState *cl, GLbyte *pc) req->context, req->oldContextTag ); } -int __glXSwapMakeContextCurrent(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_MakeContextCurrent(__GLXclientState *cl, GLbyte *pc) { xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -157,7 +155,7 @@ int __glXSwapMakeContextCurrent(__GLXclientState *cl, GLbyte *pc) req->context, req->oldContextTag ); } -int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_MakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc) { xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -172,7 +170,7 @@ int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc) req->context, req->oldContextTag ); } -int __glXSwapIsDirect(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_IsDirect(__GLXclientState *cl, GLbyte *pc) { xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -180,10 +178,10 @@ int __glXSwapIsDirect(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->context); - return __glXIsDirect(cl, pc); + return __glXDisp_IsDirect(cl, pc); } -int __glXSwapQueryVersion(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_QueryVersion(__GLXclientState *cl, GLbyte *pc) { xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -192,10 +190,10 @@ int __glXSwapQueryVersion(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(&req->majorVersion); __GLX_SWAP_INT(&req->minorVersion); - return __glXQueryVersion(cl, pc); + return __glXDisp_QueryVersion(cl, pc); } -int __glXSwapWaitGL(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_WaitGL(__GLXclientState *cl, GLbyte *pc) { xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -203,10 +201,10 @@ int __glXSwapWaitGL(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); - return __glXWaitGL(cl, pc); + return __glXDisp_WaitGL(cl, pc); } -int __glXSwapWaitX(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_WaitX(__GLXclientState *cl, GLbyte *pc) { xGLXWaitXReq *req = (xGLXWaitXReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -214,10 +212,10 @@ int __glXSwapWaitX(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); - return __glXWaitX(cl, pc); + return __glXDisp_WaitX(cl, pc); } -int __glXSwapCopyContext(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_CopyContext(__GLXclientState *cl, GLbyte *pc) { xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -227,10 +225,10 @@ int __glXSwapCopyContext(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(&req->dest); __GLX_SWAP_INT(&req->mask); - return __glXCopyContext(cl, pc); + return __glXDisp_CopyContext(cl, pc); } -int __glXSwapGetVisualConfigs(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc) { xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -239,7 +237,7 @@ int __glXSwapGetVisualConfigs(__GLXclientState *cl, GLbyte *pc) return DoGetVisualConfigs( cl, req->screen, GL_TRUE ); } -int __glXSwapGetFBConfigs(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_GetFBConfigs(__GLXclientState *cl, GLbyte *pc) { xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -248,7 +246,7 @@ int __glXSwapGetFBConfigs(__GLXclientState *cl, GLbyte *pc) return DoGetFBConfigs( cl, req->screen, GL_TRUE ); } -int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_GetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -257,7 +255,7 @@ int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc) return DoGetFBConfigs( cl, req->screen, GL_TRUE ); } -int __glXSwapCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc) { xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -272,7 +270,7 @@ int __glXSwapCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc) req->pixmap, req->glxpixmap ); } -int __glXSwapCreatePixmap(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_CreatePixmap(__GLXclientState *cl, GLbyte *pc) { xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -287,7 +285,7 @@ int __glXSwapCreatePixmap(__GLXclientState *cl, GLbyte *pc) req->pixmap, req->glxpixmap ); } -int __glXSwapCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXCreateGLXPixmapWithConfigSGIXReq *req = (xGLXCreateGLXPixmapWithConfigSGIXReq *) pc; @@ -303,7 +301,7 @@ int __glXSwapCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) req->pixmap, req->glxpixmap ); } -int __glXSwapDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_DestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) { xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -311,10 +309,10 @@ int __glXSwapDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->glxpixmap); - return __glXDestroyGLXPixmap(cl, pc); + return __glXDisp_DestroyGLXPixmap(cl, pc); } -int __glXSwapDestroyPixmap(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_DestroyPixmap(__GLXclientState *cl, GLbyte *pc) { xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -322,10 +320,10 @@ int __glXSwapDestroyPixmap(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->glxpixmap); - return __glXDestroyGLXPixmap(cl, pc); + return __glXDisp_DestroyGLXPixmap(cl, pc); } -int __glXSwapQueryContext(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_QueryContext(__GLXclientState *cl, GLbyte *pc) { xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc; @@ -334,7 +332,7 @@ int __glXSwapQueryContext(__GLXclientState *cl, GLbyte *pc) return BadRequest; } -int __glXSwapCreatePbuffer(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_CreatePbuffer(__GLXclientState *cl, GLbyte *pc) { xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc; @@ -343,14 +341,14 @@ int __glXSwapCreatePbuffer(__GLXclientState *cl, GLbyte *pc) return BadRequest; } -int __glXSwapDestroyPbuffer(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc) { xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) req; return BadRequest; } -int __glXSwapChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_ChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) { xGLXChangeDrawableAttributesReq *req = (xGLXChangeDrawableAttributesReq *) req; @@ -358,7 +356,7 @@ int __glXSwapChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) return BadRequest; } -int __glXSwapCreateWindow(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_CreateWindow(__GLXclientState *cl, GLbyte *pc) { xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc; @@ -367,7 +365,7 @@ int __glXSwapCreateWindow(__GLXclientState *cl, GLbyte *pc) return BadRequest; } -int __glXSwapDestroyWindow(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_DestroyWindow(__GLXclientState *cl, GLbyte *pc) { xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc; @@ -376,7 +374,7 @@ int __glXSwapDestroyWindow(__GLXclientState *cl, GLbyte *pc) return BadRequest; } -int __glXSwapSwapBuffers(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_SwapBuffers(__GLXclientState *cl, GLbyte *pc) { xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -385,10 +383,10 @@ int __glXSwapSwapBuffers(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(&req->contextTag); __GLX_SWAP_INT(&req->drawable); - return __glXSwapBuffers(cl, pc); + return __glXDisp_SwapBuffers(cl, pc); } -int __glXSwapUseXFont(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_UseXFont(__GLXclientState *cl, GLbyte *pc) { xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -400,11 +398,11 @@ int __glXSwapUseXFont(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(&req->count); __GLX_SWAP_INT(&req->listBase); - return __glXUseXFont(cl, pc); + return __glXDisp_UseXFont(cl, pc); } -int __glXSwapQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_QueryExtensionsString(__GLXclientState *cl, GLbyte *pc) { xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -412,10 +410,10 @@ int __glXSwapQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->screen); - return __glXQueryExtensionsString(cl, pc); + return __glXDisp_QueryExtensionsString(cl, pc); } -int __glXSwapQueryServerString(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_QueryServerString(__GLXclientState *cl, GLbyte *pc) { xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -424,10 +422,10 @@ int __glXSwapQueryServerString(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->name); - return __glXQueryServerString(cl, pc); + return __glXDisp_QueryServerString(cl, pc); } -int __glXSwapClientInfo(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_ClientInfo(__GLXclientState *cl, GLbyte *pc) { xGLXClientInfoReq *req = (xGLXClientInfoReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -437,10 +435,10 @@ int __glXSwapClientInfo(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(&req->minor); __GLX_SWAP_INT(&req->numbytes); - return __glXClientInfo(cl, pc); + return __glXDisp_ClientInfo(cl, pc); } -int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_QueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) { xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -448,10 +446,10 @@ int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->context); - return __glXQueryContextInfoEXT(cl, pc); + return __glXDisp_QueryContextInfoEXT(cl, pc); } -int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_BindTexImageEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; GLXDrawable *drawId; @@ -469,10 +467,10 @@ int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(drawId); __GLX_SWAP_INT(buffer); - return __glXBindTexImageEXT(cl, (GLbyte *)pc); + return __glXDisp_BindTexImageEXT(cl, (GLbyte *)pc); } -int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_ReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; GLXDrawable *drawId; @@ -490,10 +488,10 @@ int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(drawId); __GLX_SWAP_INT(buffer); - return __glXReleaseTexImageEXT(cl, (GLbyte *)pc); + return __glXDisp_ReleaseTexImageEXT(cl, (GLbyte *)pc); } -int __glXSwapCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; GLXDrawable *drawId; @@ -514,11 +512,11 @@ int __glXSwapCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(pc + 12); __GLX_SWAP_INT(pc + 16); - return __glXCopySubBufferMESA(cl, pc); + return __glXDisp_CopySubBufferMESA(cl, pc); } -int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc; CARD32 *data; @@ -530,10 +528,10 @@ int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(&req->contextTag); __GLX_SWAP_INT(data); - return __glXGetDrawableAttributesSGIX(cl, pc); + return __glXDisp_GetDrawableAttributesSGIX(cl, pc); } -int __glXSwapGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_GetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) { xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc; @@ -542,7 +540,7 @@ int __glXSwapGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->drawable); - return __glXGetDrawableAttributes(cl, pc); + return __glXDisp_GetDrawableAttributes(cl, pc); } @@ -641,7 +639,7 @@ void __glXSwapGetDrawableAttributesReply(ClientPtr client, ** client library to send batches of GL rendering commands. */ -int __glXSwapRender(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_Render(__GLXclientState *cl, GLbyte *pc) { xGLXRenderReq *req; ClientPtr client= cl->client; @@ -743,7 +741,7 @@ int __glXSwapRender(__GLXclientState *cl, GLbyte *pc) /* ** Execute a large rendering request (one that spans multiple X requests). */ -int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_RenderLarge(__GLXclientState *cl, GLbyte *pc) { xGLXRenderLargeReq *req; ClientPtr client= cl->client; @@ -969,10 +967,11 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc) ** allocating these entry points in the dispatch table. */ -int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_VendorPrivate(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq *req; GLint vendorcode; + __GLXdispatchVendorPrivProcPtr proc; __GLX_DECLARE_SWAP_VARIABLES; @@ -982,41 +981,24 @@ int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc) vendorcode = req->vendorCode; -#ifndef __DARWIN__ - switch( vendorcode ) { - case X_GLvop_SampleMaskSGIS: - __GLX_SWAP_FLOAT(pc + 4); - __GLX_SWAP_INT(pc + 8); - CALL_SampleMaskSGIS( GET_DISPATCH(), - (*(GLfloat *)(pc + 4), *(GLboolean *)(pc + 8)) ); + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info, + vendorcode, 1); + if (proc != NULL) { + (*proc)(cl, (GLbyte*)req); return Success; - case X_GLvop_SamplePatternSGIS: - __GLX_SWAP_INT(pc + 4); - CALL_SamplePatternSGIS( GET_DISPATCH(), (*(GLenum *)(pc + 4)) ); - return Success; - case X_GLXvop_BindTexImageEXT: - return __glXSwapBindTexImageEXT(cl, pc); - case X_GLXvop_ReleaseTexImageEXT: - return __glXSwapReleaseTexImageEXT(cl, pc); - case X_GLXvop_CopySubBufferMESA: - return __glXSwapCopySubBufferMESA(cl, pc); } -#endif - - if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && - (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { - (*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req); - return Success; - } cl->client->errorValue = req->vendorCode; return __glXError(GLXUnsupportedPrivateRequest); } -int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) + +int __glXDispSwap_VendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateWithReplyReq *req; GLint vendorcode; + __GLXdispatchVendorPrivProcPtr proc; __GLX_DECLARE_SWAP_VARIABLES; @@ -1026,42 +1008,13 @@ int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) vendorcode = req->vendorCode; - switch (vendorcode) { - case X_GLXvop_QueryContextInfoEXT: - return __glXSwapQueryContextInfoEXT(cl, pc); - case X_GLXvop_MakeCurrentReadSGI: - return __glXSwapMakeCurrentReadSGI(cl, pc); - case X_GLXvop_GetFBConfigsSGIX: - return __glXSwapGetFBConfigsSGIX(cl, pc); - case X_GLXvop_CreateContextWithConfigSGIX: - return __glXSwapCreateContextWithConfigSGIX(cl, pc); - case X_GLXvop_CreateGLXPixmapWithConfigSGIX: - return __glXSwapCreateGLXPixmapWithConfigSGIX(cl, pc); - case X_GLXvop_GetDrawableAttributesSGIX: - return __glXSwapGetDrawableAttributesSGIX(cl, pc); - case X_GLvop_IsRenderbufferEXT: - return __glXDispSwap_IsRenderbufferEXT(cl, pc); - case X_GLvop_GenRenderbuffersEXT: - return __glXDispSwap_GenRenderbuffersEXT(cl, pc); - case X_GLvop_GetRenderbufferParameterivEXT: - return __glXDispSwap_GetRenderbufferParameterivEXT(cl, pc); - case X_GLvop_IsFramebufferEXT: - return __glXDispSwap_IsFramebufferEXT(cl, pc); - case X_GLvop_GenFramebuffersEXT: - return __glXDispSwap_GenFramebuffersEXT(cl, pc); - case X_GLvop_CheckFramebufferStatusEXT: - return __glXDispSwap_CheckFramebufferStatusEXT(cl, pc); - case X_GLvop_GetFramebufferAttachmentParameterivEXT: - return __glXDispSwap_GetFramebufferAttachmentParameterivEXT(cl, pc); - default: - break; + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info, + vendorcode, 1); + if (proc != NULL) { + return (*proc)(cl, (GLbyte*)req); } - - if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && - (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { - return (*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req); - } cl->client->errorValue = req->vendorCode; return __glXError(GLXUnsupportedPrivateRequest); } diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c index 8bbb83f41..5600d175d 100644 --- a/GL/glx/glxext.c +++ b/GL/glx/glxext.c @@ -32,6 +32,8 @@ #include "unpack.h" #include "glxutil.h" #include "glxext.h" +#include "indirect_table.h" +#include "indirect_util.h" /* ** The last context used by the server. It is the context that is current @@ -452,7 +454,7 @@ static int __glXDispatch(ClientPtr client) { REQUEST(xGLXSingleReq); CARD8 opcode; - int (*proc)(__GLXclientState *cl, GLbyte *pc); + __GLXdispatchSingleProcPtr proc; __GLXclientState *cl; int retval; @@ -482,13 +484,6 @@ static int __glXDispatch(ClientPtr client) } /* - ** Check for valid opcode. - */ - if (opcode >= __GLX_SINGLE_TABLE_SIZE) { - return BadRequest; - } - - /* ** If we're expecting a glXRenderLarge request, this better be one. */ if ((cl->largeCmdRequestsSoFar != 0) && (opcode != X_GLXRenderLarge)) { @@ -499,29 +494,27 @@ static int __glXDispatch(ClientPtr client) /* ** Use the opcode to index into the procedure table. */ - if (client->swapped) - proc = __glXSwapSingleTable[opcode]; - else - proc = __glXSingleTable[opcode]; - - __glXleaveServer(); + proc = (__GLXdispatchSingleProcPtr) __glXGetProtocolDecodeFunction(& Single_dispatch_info, + opcode, + client->swapped); + if (proc != NULL) { + __glXleaveServer(); - inDispatch = True; + inDispatch = True; - retval = proc(cl, (GLbyte *) stuff); + retval = (*proc)(cl, (GLbyte *) stuff); - inDispatch = False; + inDispatch = False; - __glXenterServer(); + __glXenterServer(); + } + else { + retval = BadRequest; + } return retval; } -int __glXNoSuchSingleOpcode(__GLXclientState *cl, GLbyte *pc) -{ - return BadRequest; -} - void __glXNoSuchRenderOpcode(GLbyte *pc) { return; diff --git a/GL/glx/glxext.h b/GL/glx/glxext.h index f48f331d4..b19a7163b 100644 --- a/GL/glx/glxext.h +++ b/GL/glx/glxext.h @@ -67,7 +67,6 @@ extern GLboolean __glXFreeContext(__GLXcontext *glxc); extern void __glXFlushContextCache(void); extern void __glXNoSuchRenderOpcode(GLbyte*); -extern int __glXNoSuchSingleOpcode(__GLXclientState*, GLbyte*); extern void __glXErrorCallBack(__GLinterface *gc, GLenum code); extern void __glXClearErrorOccured(void); extern GLboolean __glXErrorOccured(void); diff --git a/GL/glx/glxserver.h b/GL/glx/glxserver.h index 8ece1e2a6..ce91ce3d8 100644 --- a/GL/glx/glxserver.h +++ b/GL/glx/glxserver.h @@ -196,9 +196,11 @@ extern __GLXprocPtr __glXProcTable[]; /* * Tables for computing the size of each rendering command. */ +typedef int (*gl_proto_size_func)(const GLbyte *, Bool); + typedef struct { int bytes; - int (*varsize)(const GLbyte *pc, Bool swap); + gl_proto_size_func varsize; } __GLXrenderSizeData; extern __GLXrenderSizeData __glXRenderSizeTable[]; extern __GLXrenderSizeData __glXRenderSizeTable_EXT[]; diff --git a/GL/glx/indirect_dispatch.h b/GL/glx/indirect_dispatch.h index 950d484bd..07bc97bce 100644 --- a/GL/glx/indirect_dispatch.h +++ b/GL/glx/indirect_dispatch.h @@ -67,6 +67,8 @@ extern HIDDEN void __glXDisp_Histogram(GLbyte * pc); extern HIDDEN void __glXDispSwap_Histogram(GLbyte * pc); extern HIDDEN int __glXDisp_GetMapfv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc); extern HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc); extern HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc); extern HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); @@ -79,16 +81,26 @@ extern HIDDEN void __glXDisp_VertexAttrib4svNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc); extern HIDDEN void __glXDisp_EvalCoord2fv(GLbyte * pc); extern HIDDEN void __glXDispSwap_EvalCoord2fv(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc); extern HIDDEN int __glXDisp_GetMapiv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetMapiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Indexubv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Indexubv(GLbyte * pc); +extern HIDDEN int __glXDisp_Render(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_Render(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_TexImage3D(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexImage3D(GLbyte * pc); +extern HIDDEN int __glXDisp_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Color3ubv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Color3ubv(GLbyte * pc); extern HIDDEN int __glXDisp_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); @@ -105,16 +117,18 @@ extern HIDDEN void __glXDisp_VertexAttribs1dvNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc); extern HIDDEN void __glXDisp_Normal3bv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc); +extern HIDDEN int __glXDisp_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Vertex3iv(GLbyte * pc); extern HIDDEN void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc); extern HIDDEN void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc); extern HIDDEN void __glXDisp_BlendColor(GLbyte * pc); extern HIDDEN void __glXDispSwap_BlendColor(GLbyte * pc); -extern HIDDEN void __glXDisp_CallLists(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CallLists(GLbyte * pc); +extern HIDDEN void __glXDisp_Scalef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Scalef(GLbyte * pc); extern HIDDEN void __glXDisp_Normal3iv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc); extern HIDDEN void __glXDisp_PassThrough(GLbyte * pc); @@ -123,8 +137,10 @@ extern HIDDEN void __glXDisp_Viewport(GLbyte * pc); extern HIDDEN void __glXDispSwap_Viewport(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_DepthRange(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc); extern HIDDEN void __glXDisp_ResetHistogram(GLbyte * pc); extern HIDDEN void __glXDispSwap_ResetHistogram(GLbyte * pc); extern HIDDEN int __glXDisp_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); @@ -145,10 +161,14 @@ extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc); extern HIDDEN void __glXDisp_TexCoord3iv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexCoord3iv(GLbyte * pc); +extern HIDDEN int __glXDisp_CopyContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CopyContext(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Color3fv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Color3fv(GLbyte * pc); extern HIDDEN void __glXDisp_PointSize(GLbyte * pc); @@ -161,36 +181,40 @@ extern HIDDEN void __glXDisp_Vertex4sv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Vertex4sv(GLbyte * pc); extern HIDDEN int __glXDisp_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LineStipple(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc); extern HIDDEN void __glXDisp_TexEnvi(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexEnvi(GLbyte * pc); extern HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc); extern HIDDEN void __glXDisp_Scaled(GLbyte * pc); extern HIDDEN void __glXDispSwap_Scaled(GLbyte * pc); -extern HIDDEN void __glXDisp_Scalef(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Scalef(GLbyte * pc); +extern HIDDEN void __glXDisp_CallLists(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CallLists(GLbyte * pc); extern HIDDEN void __glXDisp_AlphaFunc(GLbyte * pc); extern HIDDEN void __glXDispSwap_AlphaFunc(GLbyte * pc); extern HIDDEN void __glXDisp_TexCoord2iv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexCoord2iv(GLbyte * pc); extern HIDDEN void __glXDisp_CompressedTexImage1DARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Rotated(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rotated(GLbyte * pc); extern HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc); extern HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc); +extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc); extern HIDDEN void __glXDisp_TexParameterf(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc); extern HIDDEN void __glXDisp_TexParameteri(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexParameteri(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyContext(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_DrawPixels(GLbyte * pc); extern HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc); extern HIDDEN void __glXDisp_MultiTexCoord2svARB(GLbyte * pc); @@ -215,8 +239,6 @@ extern HIDDEN void __glXDisp_Color4usv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Color4usv(GLbyte * pc); extern HIDDEN void __glXDisp_Fogi(GLbyte * pc); extern HIDDEN void __glXDispSwap_Fogi(GLbyte * pc); -extern HIDDEN void __glXDisp_DepthRange(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc); extern HIDDEN void __glXDisp_RasterPos3iv(GLbyte * pc); extern HIDDEN void __glXDispSwap_RasterPos3iv(GLbyte * pc); extern HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc); @@ -229,8 +251,6 @@ extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GL extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc); extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc); extern HIDDEN void __glXDispSwap_PointParameterfvEXT(GLbyte * pc); extern HIDDEN void __glXDisp_Color3bv(GLbyte * pc); @@ -291,8 +311,14 @@ extern HIDDEN int __glXDisp_CheckFramebufferStatusEXT(struct __GLXclientStateRec extern HIDDEN int __glXDispSwap_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Normal3fv(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib4ivARB(GLbyte * pc); @@ -305,6 +331,8 @@ extern HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc); extern HIDDEN int __glXDisp_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc); extern HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc); extern HIDDEN void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc); @@ -313,6 +341,8 @@ extern HIDDEN void __glXDisp_TexGenfv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib4bvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc); extern HIDDEN void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc); extern HIDDEN void __glXDisp_BlendEquation(GLbyte * pc); @@ -337,6 +367,8 @@ extern HIDDEN void __glXDisp_EndQueryARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_EndQueryARB(GLbyte * pc); extern HIDDEN void __glXDisp_DepthMask(GLbyte * pc); extern HIDDEN void __glXDispSwap_DepthMask(GLbyte * pc); +extern HIDDEN void __glXDisp_Rotated(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rotated(GLbyte * pc); extern HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_StencilOp(GLbyte * pc); @@ -345,6 +377,8 @@ extern HIDDEN void __glXDisp_MultiTexCoord3svARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc); extern HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryServerString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryServerString(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_LoadMatrixf(GLbyte * pc); extern HIDDEN void __glXDispSwap_LoadMatrixf(GLbyte * pc); extern HIDDEN void __glXDisp_Color4bv(GLbyte * pc); @@ -361,6 +395,8 @@ extern HIDDEN void __glXDisp_LogicOp(GLbyte * pc); extern HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc); 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_FramebufferRenderbufferEXT(GLbyte * pc); @@ -371,6 +407,8 @@ extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc); extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_ProgramParameter4fvNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc); extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc); @@ -383,6 +421,8 @@ extern HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc); extern HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc); extern HIDDEN void __glXDisp_DepthFunc(GLbyte * pc); extern HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc); extern HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc); @@ -391,6 +431,8 @@ extern HIDDEN void __glXDisp_PointParameterivNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_PointParameterivNV(GLbyte * pc); extern HIDDEN void __glXDisp_BlendFunc(GLbyte * pc); extern HIDDEN void __glXDispSwap_BlendFunc(GLbyte * pc); +extern HIDDEN int __glXDisp_WaitGL(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_WaitGL(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc); extern HIDDEN void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc); @@ -407,22 +449,26 @@ extern HIDDEN void __glXDisp_PushAttrib(GLbyte * pc); extern HIDDEN void __glXDispSwap_PushAttrib(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib4usvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_TexParameteriv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexParameteriv(GLbyte * pc); extern HIDDEN void __glXDisp_WindowPos3fvMESA(GLbyte * pc); extern HIDDEN void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib1svNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_RasterPos3fv(GLbyte * pc); extern HIDDEN void __glXDispSwap_RasterPos3fv(GLbyte * pc); extern HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc); extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc); extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc); +extern HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateContext(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc); extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc); extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); @@ -431,8 +477,12 @@ extern HIDDEN void __glXDisp_Frustum(GLbyte * pc); extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc); extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_TexEnvf(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexEnvf(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib1dvARB(GLbyte * pc); @@ -443,16 +493,18 @@ extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc); extern HIDDEN void __glXDispSwap_ClearAccum(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryVersion(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryVersion(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc); extern HIDDEN void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc); extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc); -extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc); extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc); extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc); extern HIDDEN void __glXDisp_CopyTexImage2D(GLbyte * pc); @@ -467,6 +519,8 @@ extern HIDDEN void __glXDisp_Color4fv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Color4fv(GLbyte * pc); extern HIDDEN void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc); +extern HIDDEN int __glXDisp_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Lightiv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Lightiv(GLbyte * pc); extern HIDDEN int __glXDisp_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); @@ -479,8 +533,6 @@ extern HIDDEN void __glXDisp_VertexAttrib2dvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttribs2svNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc); extern HIDDEN void __glXDisp_Rectdv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib4NivARB(GLbyte * pc); @@ -495,8 +547,8 @@ extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc); extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_TexGeni(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexGeni(GLbyte * pc); extern HIDDEN void __glXDisp_TexGenf(GLbyte * pc); @@ -513,6 +565,8 @@ extern HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Color4sv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Color4sv(GLbyte * pc); extern HIDDEN int __glXDisp_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); @@ -531,14 +585,18 @@ extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyt extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetMapdv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_SamplePatternSGIS(GLbyte * pc); extern HIDDEN void __glXDispSwap_SamplePatternSGIS(GLbyte * pc); extern HIDDEN int __glXDisp_PixelStoref(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_PixelStoref(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc); extern HIDDEN int __glXDisp_PixelStorei(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_PixelStorei(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc); extern HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc); extern HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib3svARB(GLbyte * pc); @@ -563,10 +621,12 @@ extern HIDDEN void __glXDisp_TexImage1D(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexImage1D(GLbyte * pc); extern HIDDEN void __glXDisp_FrontFace(GLbyte * pc); extern HIDDEN void __glXDispSwap_FrontFace(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_RenderLarge(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_RenderLarge(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_VertexAttrib4dvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc); extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc); extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc); @@ -585,6 +645,8 @@ extern HIDDEN int __glXDisp_GetFramebufferAttachmentParameterivEXT(struct __GLXc extern HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetDoublev(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetDoublev(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_MultMatrixd(GLbyte * pc); @@ -603,6 +665,8 @@ extern HIDDEN void __glXDisp_VertexAttrib3fvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc); extern HIDDEN void __glXDisp_ClearColor(GLbyte * pc); extern HIDDEN void __glXDispSwap_ClearColor(GLbyte * pc); +extern HIDDEN int __glXDisp_IsDirect(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsDirect(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc); extern HIDDEN void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc); extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc); @@ -633,6 +697,8 @@ extern HIDDEN void __glXDisp_VertexAttrib3svNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc); extern HIDDEN int __glXDisp_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_SeparableFilter2D(GLbyte * pc); extern HIDDEN void __glXDispSwap_SeparableFilter2D(GLbyte * pc); extern HIDDEN void __glXDisp_Map1d(GLbyte * pc); @@ -647,6 +713,8 @@ extern HIDDEN void __glXDisp_ProgramParameters4fvNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc); extern HIDDEN int __glXDisp_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc); @@ -661,12 +729,10 @@ extern HIDDEN void __glXDisp_TexCoord1dv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexCoord1dv(GLbyte * pc); extern HIDDEN void __glXDisp_PixelTransferi(GLbyte * pc); extern HIDDEN void __glXDispSwap_PixelTransferi(GLbyte * pc); -extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttrib3fvNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc); extern HIDDEN void __glXDisp_Clear(GLbyte * pc); extern HIDDEN void __glXDispSwap_Clear(GLbyte * pc); extern HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc); @@ -681,8 +747,10 @@ extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc); extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc); extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ShadeModel(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc); +extern HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_CallList(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CallList(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttribs2fvNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc); extern HIDDEN void __glXDisp_Rectiv(GLbyte * pc); @@ -697,6 +765,8 @@ extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc); extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc); extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc); +extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc); extern HIDDEN int __glXDisp_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); @@ -711,6 +781,8 @@ extern HIDDEN int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *, GLb extern HIDDEN int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_LineWidth(GLbyte * pc); extern HIDDEN void __glXDispSwap_LineWidth(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc); extern HIDDEN void __glXDisp_TexGendv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc); extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc); @@ -723,8 +795,10 @@ extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc); extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_CallList(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CallList(GLbyte * pc); +extern HIDDEN int __glXDisp_UseXFont(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_UseXFont(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ShadeModel(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc); extern HIDDEN void __glXDisp_Materialfv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Materialfv(GLbyte * pc); extern HIDDEN void __glXDisp_TexCoord3fv(GLbyte * pc); @@ -735,8 +809,8 @@ extern HIDDEN void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc); extern HIDDEN void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_DrawArrays(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc); extern HIDDEN void __glXDisp_Color3iv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Color3iv(GLbyte * pc); extern HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); @@ -759,16 +833,18 @@ extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc); extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc); extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Map2d(GLbyte * pc); extern HIDDEN void __glXDispSwap_Map2d(GLbyte * pc); extern HIDDEN void __glXDisp_Map2f(GLbyte * pc); extern HIDDEN void __glXDispSwap_Map2f(GLbyte * pc); extern HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc); extern HIDDEN int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); @@ -799,6 +875,8 @@ extern HIDDEN void __glXDisp_Translatef(GLbyte * pc); extern HIDDEN void __glXDispSwap_Translatef(GLbyte * pc); extern HIDDEN void __glXDisp_StencilMask(GLbyte * pc); extern HIDDEN void __glXDispSwap_StencilMask(GLbyte * pc); +extern HIDDEN int __glXDisp_CreateWindow(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateWindow(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_GetLightiv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetLightiv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *); @@ -813,8 +891,8 @@ extern HIDDEN void __glXDisp_CopyTexSubImage1D(GLbyte * pc); extern HIDDEN void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc); extern HIDDEN void __glXDisp_CullFace(GLbyte * pc); extern HIDDEN void __glXDispSwap_CullFace(GLbyte * pc); -extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_VertexAttribs3svNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc); extern HIDDEN void __glXDisp_StencilFunc(GLbyte * pc); @@ -837,6 +915,8 @@ extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Indexfv(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryContext(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_SecondaryColor3svEXT(GLbyte * pc); extern HIDDEN void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc); extern HIDDEN void __glXDisp_IndexMask(GLbyte * pc); @@ -885,8 +965,8 @@ extern HIDDEN void __glXDisp_TexCoord4dv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexCoord4dv(GLbyte * pc); extern HIDDEN void __glXDisp_Begin(GLbyte * pc); extern HIDDEN void __glXDispSwap_Begin(GLbyte * pc); -extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc); +extern HIDDEN int __glXDisp_ClientInfo(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ClientInfo(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_Rectfv(GLbyte * pc); extern HIDDEN void __glXDispSwap_Rectfv(GLbyte * pc); extern HIDDEN void __glXDisp_LightModelf(GLbyte * pc); @@ -901,16 +981,14 @@ extern HIDDEN void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc); extern HIDDEN void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc); extern HIDDEN int __glXDisp_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN int __glXDispSwap_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_DrawArrays(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc); +extern HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); extern HIDDEN void __glXDisp_ColorMask(GLbyte * pc); extern HIDDEN void __glXDispSwap_ColorMask(GLbyte * pc); extern HIDDEN void __glXDisp_RasterPos4iv(GLbyte * pc); extern HIDDEN void __glXDispSwap_RasterPos4iv(GLbyte * pc); extern HIDDEN void __glXDisp_Enable(GLbyte * pc); extern HIDDEN void __glXDispSwap_Enable(GLbyte * pc); -extern HIDDEN void __glXDisp_LineStipple(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc); extern HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc); extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc); extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); diff --git a/GL/glx/indirect_table.c b/GL/glx/indirect_table.c new file mode 100644 index 000000000..da5fb6b56 --- /dev/null +++ b/GL/glx/indirect_table.c @@ -0,0 +1,509 @@ +/* DO NOT EDIT - This file generated automatically by glX_server_table.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005, 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 + * 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 + * IBM, + * 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. + */ + +#include <inttypes.h> +#include "glxserver.h" +#include "glxext.h" +#include "indirect_dispatch.h" +#include "indirect_reqsize.h" +#include "g_disptab.h" +#include "indirect_table.h" + +/*****************************************************************/ +/* tree depth = 3 */ +static const int_fast16_t Single_dispatch_tree[24] = { + /* [0] -> opcode range [0, 256], node depth 1 */ + 2, + 5, + 13, + 16, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 64], node depth 2 */ + 2, + LEAF(0), + LEAF(16), + 10, + EMPTY_LEAF, + + /* [10] -> opcode range [32, 48], node depth 3 */ + 1, + LEAF(32), + EMPTY_LEAF, + + /* [13] -> opcode range [64, 128], node depth 2 */ + 1, + EMPTY_LEAF, + LEAF(40), + + /* [16] -> opcode range [128, 192], node depth 2 */ + 2, + LEAF(72), + LEAF(88), + 21, + EMPTY_LEAF, + + /* [21] -> opcode range [160, 176], node depth 3 */ + 1, + LEAF(104), + EMPTY_LEAF, + +}; + +static const __GLXdispatchSingleProcPtr Single_function_table[112][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_Render, __glXDispSwap_Render}, + /* [ 2] = 2 */ {__glXDisp_RenderLarge, __glXDispSwap_RenderLarge}, + /* [ 3] = 3 */ {__glXDisp_CreateContext, __glXDispSwap_CreateContext}, + /* [ 4] = 4 */ {__glXDisp_DestroyContext, __glXDispSwap_DestroyContext}, + /* [ 5] = 5 */ {__glXDisp_MakeCurrent, __glXDispSwap_MakeCurrent}, + /* [ 6] = 6 */ {__glXDisp_IsDirect, __glXDispSwap_IsDirect}, + /* [ 7] = 7 */ {__glXDisp_QueryVersion, __glXDispSwap_QueryVersion}, + /* [ 8] = 8 */ {__glXDisp_WaitGL, __glXDispSwap_WaitGL}, + /* [ 9] = 9 */ {__glXDisp_WaitX, __glXDispSwap_WaitX}, + /* [ 10] = 10 */ {__glXDisp_CopyContext, __glXDispSwap_CopyContext}, + /* [ 11] = 11 */ {__glXDisp_SwapBuffers, __glXDispSwap_SwapBuffers}, + /* [ 12] = 12 */ {__glXDisp_UseXFont, __glXDispSwap_UseXFont}, + /* [ 13] = 13 */ {__glXDisp_CreateGLXPixmap, __glXDispSwap_CreateGLXPixmap}, + /* [ 14] = 14 */ {__glXDisp_GetVisualConfigs, __glXDispSwap_GetVisualConfigs}, + /* [ 15] = 15 */ {__glXDisp_DestroyGLXPixmap, __glXDispSwap_DestroyGLXPixmap}, + /* [ 16] = 16 */ {__glXDisp_VendorPrivate, __glXDispSwap_VendorPrivate}, + /* [ 17] = 17 */ {__glXDisp_VendorPrivateWithReply, __glXDispSwap_VendorPrivateWithReply}, + /* [ 18] = 18 */ {__glXDisp_QueryExtensionsString, __glXDispSwap_QueryExtensionsString}, + /* [ 19] = 19 */ {__glXDisp_QueryServerString, __glXDispSwap_QueryServerString}, + /* [ 20] = 20 */ {__glXDisp_ClientInfo, __glXDispSwap_ClientInfo}, + /* [ 21] = 21 */ {__glXDisp_GetFBConfigs, __glXDispSwap_GetFBConfigs}, + /* [ 22] = 22 */ {__glXDisp_CreatePixmap, __glXDispSwap_CreatePixmap}, + /* [ 23] = 23 */ {__glXDisp_DestroyPixmap, __glXDispSwap_DestroyPixmap}, + /* [ 24] = 24 */ {__glXDisp_CreateNewContext, __glXDispSwap_CreateNewContext}, + /* [ 25] = 25 */ {__glXDisp_QueryContext, __glXDispSwap_QueryContext}, + /* [ 26] = 26 */ {__glXDisp_MakeContextCurrent, __glXDispSwap_MakeContextCurrent}, + /* [ 27] = 27 */ {__glXDisp_CreatePbuffer, __glXDispSwap_CreatePbuffer}, + /* [ 28] = 28 */ {__glXDisp_DestroyPbuffer, __glXDispSwap_DestroyPbuffer}, + /* [ 29] = 29 */ {__glXDisp_GetDrawableAttributes, __glXDispSwap_GetDrawableAttributes}, + /* [ 30] = 30 */ {__glXDisp_ChangeDrawableAttributes, __glXDispSwap_ChangeDrawableAttributes}, + /* [ 31] = 31 */ {__glXDisp_CreateWindow, __glXDispSwap_CreateWindow}, + /* [ 32] = 32 */ {__glXDisp_DestroyWindow, __glXDispSwap_DestroyWindow}, + /* [ 33] = 33 */ {NULL, NULL}, + /* [ 34] = 34 */ {NULL, NULL}, + /* [ 35] = 35 */ {NULL, NULL}, + /* [ 36] = 36 */ {NULL, NULL}, + /* [ 37] = 37 */ {NULL, NULL}, + /* [ 38] = 38 */ {NULL, NULL}, + /* [ 39] = 39 */ {NULL, NULL}, + /* [ 40] = 96 */ {NULL, NULL}, + /* [ 41] = 97 */ {NULL, NULL}, + /* [ 42] = 98 */ {NULL, NULL}, + /* [ 43] = 99 */ {NULL, NULL}, + /* [ 44] = 100 */ {NULL, NULL}, + /* [ 45] = 101 */ {__glXDisp_NewList, __glXDispSwap_NewList}, + /* [ 46] = 102 */ {__glXDisp_EndList, __glXDispSwap_EndList}, + /* [ 47] = 103 */ {__glXDisp_DeleteLists, __glXDispSwap_DeleteLists}, + /* [ 48] = 104 */ {__glXDisp_GenLists, __glXDispSwap_GenLists}, + /* [ 49] = 105 */ {__glXDisp_FeedbackBuffer, __glXDispSwap_FeedbackBuffer}, + /* [ 50] = 106 */ {__glXDisp_SelectBuffer, __glXDispSwap_SelectBuffer}, + /* [ 51] = 107 */ {__glXDisp_RenderMode, __glXDispSwap_RenderMode}, + /* [ 52] = 108 */ {__glXDisp_Finish, __glXDispSwap_Finish}, + /* [ 53] = 109 */ {__glXDisp_PixelStoref, __glXDispSwap_PixelStoref}, + /* [ 54] = 110 */ {__glXDisp_PixelStorei, __glXDispSwap_PixelStorei}, + /* [ 55] = 111 */ {__glXDisp_ReadPixels, __glXDispSwap_ReadPixels}, + /* [ 56] = 112 */ {__glXDisp_GetBooleanv, __glXDispSwap_GetBooleanv}, + /* [ 57] = 113 */ {__glXDisp_GetClipPlane, __glXDispSwap_GetClipPlane}, + /* [ 58] = 114 */ {__glXDisp_GetDoublev, __glXDispSwap_GetDoublev}, + /* [ 59] = 115 */ {__glXDisp_GetError, __glXDispSwap_GetError}, + /* [ 60] = 116 */ {__glXDisp_GetFloatv, __glXDispSwap_GetFloatv}, + /* [ 61] = 117 */ {__glXDisp_GetIntegerv, __glXDispSwap_GetIntegerv}, + /* [ 62] = 118 */ {__glXDisp_GetLightfv, __glXDispSwap_GetLightfv}, + /* [ 63] = 119 */ {__glXDisp_GetLightiv, __glXDispSwap_GetLightiv}, + /* [ 64] = 120 */ {__glXDisp_GetMapdv, __glXDispSwap_GetMapdv}, + /* [ 65] = 121 */ {__glXDisp_GetMapfv, __glXDispSwap_GetMapfv}, + /* [ 66] = 122 */ {__glXDisp_GetMapiv, __glXDispSwap_GetMapiv}, + /* [ 67] = 123 */ {__glXDisp_GetMaterialfv, __glXDispSwap_GetMaterialfv}, + /* [ 68] = 124 */ {__glXDisp_GetMaterialiv, __glXDispSwap_GetMaterialiv}, + /* [ 69] = 125 */ {__glXDisp_GetPixelMapfv, __glXDispSwap_GetPixelMapfv}, + /* [ 70] = 126 */ {__glXDisp_GetPixelMapuiv, __glXDispSwap_GetPixelMapuiv}, + /* [ 71] = 127 */ {__glXDisp_GetPixelMapusv, __glXDispSwap_GetPixelMapusv}, + /* [ 72] = 128 */ {__glXDisp_GetPolygonStipple, __glXDispSwap_GetPolygonStipple}, + /* [ 73] = 129 */ {__glXDisp_GetString, __glXDispSwap_GetString}, + /* [ 74] = 130 */ {__glXDisp_GetTexEnvfv, __glXDispSwap_GetTexEnvfv}, + /* [ 75] = 131 */ {__glXDisp_GetTexEnviv, __glXDispSwap_GetTexEnviv}, + /* [ 76] = 132 */ {__glXDisp_GetTexGendv, __glXDispSwap_GetTexGendv}, + /* [ 77] = 133 */ {__glXDisp_GetTexGenfv, __glXDispSwap_GetTexGenfv}, + /* [ 78] = 134 */ {__glXDisp_GetTexGeniv, __glXDispSwap_GetTexGeniv}, + /* [ 79] = 135 */ {__glXDisp_GetTexImage, __glXDispSwap_GetTexImage}, + /* [ 80] = 136 */ {__glXDisp_GetTexParameterfv, __glXDispSwap_GetTexParameterfv}, + /* [ 81] = 137 */ {__glXDisp_GetTexParameteriv, __glXDispSwap_GetTexParameteriv}, + /* [ 82] = 138 */ {__glXDisp_GetTexLevelParameterfv, __glXDispSwap_GetTexLevelParameterfv}, + /* [ 83] = 139 */ {__glXDisp_GetTexLevelParameteriv, __glXDispSwap_GetTexLevelParameteriv}, + /* [ 84] = 140 */ {__glXDisp_IsEnabled, __glXDispSwap_IsEnabled}, + /* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList}, + /* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush}, + /* [ 87] = 143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident}, + /* [ 88] = 144 */ {NULL, NULL}, + /* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures}, + /* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture}, + /* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable}, + /* [ 92] = 148 */ {__glXDisp_GetColorTableParameterfv, __glXDispSwap_GetColorTableParameterfv}, + /* [ 93] = 149 */ {__glXDisp_GetColorTableParameteriv, __glXDispSwap_GetColorTableParameteriv}, + /* [ 94] = 150 */ {__glXDisp_GetConvolutionFilter, __glXDispSwap_GetConvolutionFilter}, + /* [ 95] = 151 */ {__glXDisp_GetConvolutionParameterfv, __glXDispSwap_GetConvolutionParameterfv}, + /* [ 96] = 152 */ {__glXDisp_GetConvolutionParameteriv, __glXDispSwap_GetConvolutionParameteriv}, + /* [ 97] = 153 */ {__glXDisp_GetSeparableFilter, __glXDispSwap_GetSeparableFilter}, + /* [ 98] = 154 */ {__glXDisp_GetHistogram, __glXDispSwap_GetHistogram}, + /* [ 99] = 155 */ {__glXDisp_GetHistogramParameterfv, __glXDispSwap_GetHistogramParameterfv}, + /* [ 100] = 156 */ {__glXDisp_GetHistogramParameteriv, __glXDispSwap_GetHistogramParameteriv}, + /* [ 101] = 157 */ {__glXDisp_GetMinmax, __glXDispSwap_GetMinmax}, + /* [ 102] = 158 */ {__glXDisp_GetMinmaxParameterfv, __glXDispSwap_GetMinmaxParameterfv}, + /* [ 103] = 159 */ {__glXDisp_GetMinmaxParameteriv, __glXDispSwap_GetMinmaxParameteriv}, + /* [ 104] = 160 */ {__glXDisp_GetCompressedTexImageARB, __glXDispSwap_GetCompressedTexImageARB}, + /* [ 105] = 161 */ {__glXDisp_DeleteQueriesARB, __glXDispSwap_DeleteQueriesARB}, + /* [ 106] = 162 */ {__glXDisp_GenQueriesARB, __glXDispSwap_GenQueriesARB}, + /* [ 107] = 163 */ {__glXDisp_IsQueryARB, __glXDispSwap_IsQueryARB}, + /* [ 108] = 164 */ {__glXDisp_GetQueryivARB, __glXDispSwap_GetQueryivARB}, + /* [ 109] = 165 */ {__glXDisp_GetQueryObjectivARB, __glXDispSwap_GetQueryObjectivARB}, + /* [ 110] = 166 */ {__glXDisp_GetQueryObjectuivARB, __glXDispSwap_GetQueryObjectuivARB}, + /* [ 111] = 167 */ {NULL, NULL}, +}; + +const struct __glXDispatchInfo Single_dispatch_info = { + 8, + Single_dispatch_tree, + Single_function_table, + NULL, + NULL +}; + +/*****************************************************************/ +/* tree depth = 13 */ +static const int_fast16_t VendorPriv_dispatch_tree[138] = { + /* [0] -> opcode range [0, 131072], node depth 1 */ + 2, + 5, + EMPTY_LEAF, + 102, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 32768], node depth 2 */ + 1, + 8, + EMPTY_LEAF, + + /* [8] -> opcode range [0, 16384], node depth 3 */ + 1, + 11, + EMPTY_LEAF, + + /* [11] -> opcode range [0, 8192], node depth 4 */ + 2, + 16, + EMPTY_LEAF, + 78, + EMPTY_LEAF, + + /* [16] -> opcode range [0, 2048], node depth 5 */ + 2, + 21, + EMPTY_LEAF, + 39, + EMPTY_LEAF, + + /* [21] -> opcode range [0, 512], node depth 6 */ + 1, + 24, + EMPTY_LEAF, + + /* [24] -> opcode range [0, 256], node depth 7 */ + 1, + 27, + EMPTY_LEAF, + + /* [27] -> opcode range [0, 128], node depth 8 */ + 1, + 30, + EMPTY_LEAF, + + /* [30] -> opcode range [0, 64], node depth 9 */ + 1, + 33, + EMPTY_LEAF, + + /* [33] -> opcode range [0, 32], node depth 10 */ + 1, + 36, + EMPTY_LEAF, + + /* [36] -> opcode range [0, 16], node depth 11 */ + 1, + EMPTY_LEAF, + LEAF(0), + + /* [39] -> opcode range [1024, 1536], node depth 6 */ + 2, + 44, + EMPTY_LEAF, + 56, + 67, + + /* [44] -> opcode range [1024, 1152], node depth 7 */ + 1, + 47, + EMPTY_LEAF, + + /* [47] -> opcode range [1024, 1088], node depth 8 */ + 1, + 50, + EMPTY_LEAF, + + /* [50] -> opcode range [1024, 1056], node depth 9 */ + 1, + 53, + EMPTY_LEAF, + + /* [53] -> opcode range [1024, 1040], node depth 10 */ + 1, + LEAF(8), + EMPTY_LEAF, + + /* [56] -> opcode range [1280, 1408], node depth 7 */ + 1, + 59, + EMPTY_LEAF, + + /* [59] -> opcode range [1280, 1344], node depth 8 */ + 1, + 62, + EMPTY_LEAF, + + /* [62] -> opcode range [1280, 1312], node depth 9 */ + 2, + EMPTY_LEAF, + LEAF(16), + LEAF(24), + LEAF(32), + + /* [67] -> opcode range [1408, 1536], node depth 7 */ + 1, + 70, + EMPTY_LEAF, + + /* [70] -> opcode range [1408, 1472], node depth 8 */ + 1, + 73, + EMPTY_LEAF, + + /* [73] -> opcode range [1408, 1440], node depth 9 */ + 2, + EMPTY_LEAF, + LEAF(40), + LEAF(48), + EMPTY_LEAF, + + /* [78] -> opcode range [4096, 6144], node depth 5 */ + 1, + EMPTY_LEAF, + 81, + + /* [81] -> opcode range [5120, 6144], node depth 6 */ + 1, + 84, + EMPTY_LEAF, + + /* [84] -> opcode range [5120, 5632], node depth 7 */ + 1, + 87, + EMPTY_LEAF, + + /* [87] -> opcode range [5120, 5376], node depth 8 */ + 1, + 90, + EMPTY_LEAF, + + /* [90] -> opcode range [5120, 5248], node depth 9 */ + 1, + 93, + EMPTY_LEAF, + + /* [93] -> opcode range [5120, 5184], node depth 10 */ + 1, + EMPTY_LEAF, + 96, + + /* [96] -> opcode range [5152, 5184], node depth 11 */ + 1, + 99, + EMPTY_LEAF, + + /* [99] -> opcode range [5152, 5168], node depth 12 */ + 1, + LEAF(56), + EMPTY_LEAF, + + /* [102] -> opcode range [65536, 98304], node depth 2 */ + 1, + 105, + EMPTY_LEAF, + + /* [105] -> opcode range [65536, 81920], node depth 3 */ + 1, + 108, + EMPTY_LEAF, + + /* [108] -> opcode range [65536, 73728], node depth 4 */ + 1, + 111, + EMPTY_LEAF, + + /* [111] -> opcode range [65536, 69632], node depth 5 */ + 1, + 114, + EMPTY_LEAF, + + /* [114] -> opcode range [65536, 67584], node depth 6 */ + 1, + 117, + EMPTY_LEAF, + + /* [117] -> opcode range [65536, 66560], node depth 7 */ + 1, + 120, + EMPTY_LEAF, + + /* [120] -> opcode range [65536, 66048], node depth 8 */ + 1, + 123, + EMPTY_LEAF, + + /* [123] -> opcode range [65536, 65792], node depth 9 */ + 1, + 126, + EMPTY_LEAF, + + /* [126] -> opcode range [65536, 65664], node depth 10 */ + 1, + 129, + EMPTY_LEAF, + + /* [129] -> opcode range [65536, 65600], node depth 11 */ + 1, + 132, + EMPTY_LEAF, + + /* [132] -> opcode range [65536, 65568], node depth 12 */ + 1, + 135, + EMPTY_LEAF, + + /* [135] -> opcode range [65536, 65552], node depth 13 */ + 1, + LEAF(64), + EMPTY_LEAF, + +}; + +static const __GLXdispatchVendorPrivProcPtr VendorPriv_function_table[72][2] = { + /* [ 0] = 8 */ {NULL, NULL}, + /* [ 1] = 9 */ {NULL, NULL}, + /* [ 2] = 10 */ {NULL, NULL}, + /* [ 3] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT}, + /* [ 4] = 12 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures}, + /* [ 5] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT}, + /* [ 6] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT}, + /* [ 7] = 15 */ {NULL, NULL}, + /* [ 8] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT}, + /* [ 9] = 1025 */ {NULL, NULL}, + /* [ 10] = 1026 */ {NULL, NULL}, + /* [ 11] = 1027 */ {NULL, NULL}, + /* [ 12] = 1028 */ {NULL, NULL}, + /* [ 13] = 1029 */ {NULL, NULL}, + /* [ 14] = 1030 */ {NULL, NULL}, + /* [ 15] = 1031 */ {NULL, NULL}, + /* [ 16] = 1288 */ {NULL, NULL}, + /* [ 17] = 1289 */ {NULL, NULL}, + /* [ 18] = 1290 */ {NULL, NULL}, + /* [ 19] = 1291 */ {NULL, NULL}, + /* [ 20] = 1292 */ {NULL, NULL}, + /* [ 21] = 1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV}, + /* [ 22] = 1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV}, + /* [ 23] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV}, + /* [ 24] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB}, + /* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB}, + /* [ 26] = 1298 */ {__glXDisp_GetProgramivNV, __glXDispSwap_GetProgramivNV}, + /* [ 27] = 1299 */ {__glXDisp_GetProgramStringNV, __glXDispSwap_GetProgramStringNV}, + /* [ 28] = 1300 */ {__glXDisp_GetTrackMatrixivNV, __glXDispSwap_GetTrackMatrixivNV}, + /* [ 29] = 1301 */ {__glXDisp_GetVertexAttribdvARB, __glXDispSwap_GetVertexAttribdvARB}, + /* [ 30] = 1302 */ {__glXDisp_GetVertexAttribfvNV, __glXDispSwap_GetVertexAttribfvNV}, + /* [ 31] = 1303 */ {__glXDisp_GetVertexAttribivNV, __glXDispSwap_GetVertexAttribivNV}, + /* [ 32] = 1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV}, + /* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB}, + /* [ 34] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB, __glXDispSwap_GetProgramLocalParameterdvARB}, + /* [ 35] = 1307 */ {__glXDisp_GetProgramivARB, __glXDispSwap_GetProgramivARB}, + /* [ 36] = 1308 */ {__glXDisp_GetProgramStringARB, __glXDispSwap_GetProgramStringARB}, + /* [ 37] = 1309 */ {NULL, NULL}, + /* [ 38] = 1310 */ {__glXDisp_GetProgramNamedParameterfvNV, __glXDispSwap_GetProgramNamedParameterfvNV}, + /* [ 39] = 1311 */ {__glXDisp_GetProgramNamedParameterdvNV, __glXDispSwap_GetProgramNamedParameterdvNV}, + /* [ 40] = 1416 */ {NULL, NULL}, + /* [ 41] = 1417 */ {NULL, NULL}, + /* [ 42] = 1418 */ {NULL, NULL}, + /* [ 43] = 1419 */ {NULL, NULL}, + /* [ 44] = 1420 */ {NULL, NULL}, + /* [ 45] = 1421 */ {NULL, NULL}, + /* [ 46] = 1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT}, + /* [ 47] = 1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT}, + /* [ 48] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT}, + /* [ 49] = 1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT}, + /* [ 50] = 1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT}, + /* [ 51] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT}, + /* [ 52] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT}, + /* [ 53] = 1429 */ {NULL, NULL}, + /* [ 54] = 1430 */ {NULL, NULL}, + /* [ 55] = 1431 */ {NULL, NULL}, + /* [ 56] = 5152 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT}, + /* [ 57] = 5153 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT}, + /* [ 58] = 5154 */ {NULL, NULL}, + /* [ 59] = 5155 */ {NULL, NULL}, + /* [ 60] = 5156 */ {NULL, NULL}, + /* [ 61] = 5157 */ {NULL, NULL}, + /* [ 62] = 5158 */ {NULL, NULL}, + /* [ 63] = 5159 */ {NULL, NULL}, + /* [ 64] = 65536 */ {NULL, NULL}, + /* [ 65] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI}, + /* [ 66] = 65538 */ {NULL, NULL}, + /* [ 67] = 65539 */ {NULL, NULL}, + /* [ 68] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX}, + /* [ 69] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX}, + /* [ 70] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX}, + /* [ 71] = 65543 */ {NULL, NULL}, +}; + +const struct __glXDispatchInfo VendorPriv_dispatch_info = { + 17, + VendorPriv_dispatch_tree, + VendorPriv_function_table, + NULL, + NULL +}; + diff --git a/GL/glx/indirect_table.h b/GL/glx/indirect_table.h new file mode 100644 index 000000000..a2562a0ca --- /dev/null +++ b/GL/glx/indirect_table.h @@ -0,0 +1,106 @@ +/* + * (C) Copyright IBM Corporation 2005, 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 + * 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 + * IBM, + * 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 indirect_table.h + * + * \author Ian Romanick <idr@us.ibm.com> + */ + +#ifndef INDIRECT_TABLE_H +#define INDIRECT_TABLE_H + +#include <inttypes.h> + +/** + */ +struct __glXDispatchInfo { + /** + * Number of significant bits in the protocol opcode. Opcodes with values + * larger than ((1 << bits) - 1) are invalid. + */ + unsigned bits; + + /** + */ + const int_fast16_t * dispatch_tree; + + /** + * Array of protocol decode and dispatch functions index by the opcode + * search tree (i.e., \c dispatch_tree). The first element in each pair + * is the non-byte-swapped version, and the second element is the + * byte-swapped version. + */ + void * const (*dispatch_functions)[2]; + + /** + * Pointer to size validation data. This table is indexed with the same + * value as ::dispatch_functions. + * + * The first element in the pair is the size, in bytes, of the fixed-size + * portion of the protocol. + * + * For opcodes that have a variable-size portion, the second value is an + * index in \c size_func_table to calculate that size. If there is no + * variable-size portion, this index will be ~0. + * + * \note + * If size checking is not to be performed on this type of protocol + * data, this pointer will be \c NULL. + */ + const int_fast16_t * size_table[2]; + + /** + * Array of functions used to calculate the variable-size portion of + * protocol messages. Indexed by the second element of the entries + * in \c ::size_table. + * + * \note + * If size checking is not to be performed on this type of protocol + * data, this pointer will be \c NULL. + */ + const gl_proto_size_func * size_func_table; +}; + +/** + * Sentinel value for an empty leaf in the \c dispatch_tree. + */ +#define EMPTY_LEAF INT_FAST16_MIN + +/** + * Declare the index \c x as a leaf index. + */ +#define LEAF(x) -x + +/** + * Determine if an index is a leaf index. + */ +#define IS_LEAF_INDEX(x) ((x) <= 0) + +extern const struct __glXDispatchInfo Single_dispatch_info; +extern const struct __glXDispatchInfo Render_dispatch_info; +extern const struct __glXDispatchInfo VendorPriv_dispatch_info; + +#endif /* INDIRECT_TABLE_H */ diff --git a/GL/glx/indirect_util.c b/GL/glx/indirect_util.c index bab0226be..3964cd52d 100644 --- a/GL/glx/indirect_util.c +++ b/GL/glx/indirect_util.c @@ -52,6 +52,7 @@ #include "glthread.h" #include "dispatch.h" #include "glxext.h" +#include "indirect_table.h" #include "indirect_util.h" @@ -204,3 +205,113 @@ __glXSendReplySwap( ClientPtr client, const void * data, size_t elements, WriteToClient( client, reply_ints * 4, (char *) data ); } } + + +static int +get_decode_index(const struct __glXDispatchInfo *dispatch_info, + unsigned opcode) +{ + int remaining_bits; + int next_remain; + const int_fast16_t * const tree = dispatch_info->dispatch_tree; + int_fast16_t index; + + + remaining_bits = dispatch_info->bits; + if (opcode >= (1U << remaining_bits)) { + return -1; + } + + index = 0; + for (/* empty */; remaining_bits > 0; remaining_bits = next_remain) { + unsigned mask; + unsigned child_index; + + + /* Calculate the slice of bits used by this node. + * + * If remaining_bits = 8 and tree[index] = 3, the mask of just the + * remaining bits is 0x00ff and the mask for the remaining bits after + * this node is 0x001f. By taking 0x00ff & ~0x001f, we get 0x00e0. + * This masks the 3 bits that we would want for this node. + */ + + next_remain = remaining_bits - tree[index]; + mask = ((1 << remaining_bits) - 1) & + ~((1 << next_remain) - 1); + + + /* Using the mask, calculate the index of the opcode in the node. + * With that index, fetch the index of the next node. + */ + + child_index = (opcode & mask) >> next_remain; + index = tree[index + 1 + child_index]; + + + /* If the next node is an empty leaf, the opcode is for a non-existant + * function. We're done. + * + * If the next node is a non-empty leaf, look up the function pointer + * and return it. + */ + + if (index == EMPTY_LEAF) { + return -1; + } + else if (IS_LEAF_INDEX(index)) { + unsigned func_index; + + + /* The value stored in the tree for a leaf node is the base of + * the function pointers for that leaf node. The offset for the + * function for a particular opcode is the remaining bits in the + * opcode. + */ + + func_index = -index; + func_index += opcode & ((1 << next_remain) - 1); + return func_index; + } + } + + /* We should *never* get here!!! + */ + return -1; +} + + +void * +__glXGetProtocolDecodeFunction(const struct __glXDispatchInfo *dispatch_info, + int opcode, int swapped_version) +{ + const int func_index = get_decode_index(dispatch_info, opcode); + + return (func_index < 0) + ? NULL + : dispatch_info->dispatch_functions[func_index][swapped_version]; +} + + +int +__glXGetProtocolSizeData(const struct __glXDispatchInfo *dispatch_info, + int opcode, __GLXrenderSizeData *data) +{ + if (dispatch_info->size_table != NULL) { + const int func_index = get_decode_index(dispatch_info, opcode); + + if (func_index >= 0) { + const int var_offset = + dispatch_info->size_table[func_index][1]; + + data->bytes = dispatch_info->size_table[func_index][0]; + data->varsize = (var_offset != ~0) + ? dispatch_info->size_table[func_index] + : NULL; + + return 0; + } + } + + return -1; +} diff --git a/GL/glx/indirect_util.h b/GL/glx/indirect_util.h index 3abe81f13..b00727a4d 100644 --- a/GL/glx/indirect_util.h +++ b/GL/glx/indirect_util.h @@ -40,4 +40,14 @@ extern void __glXSendReplySwap( ClientPtr client, const void * data, size_t elements, size_t element_size, GLboolean always_array, CARD32 retval ); +struct __glXDispatchInfo; + +extern void *__glXGetProtocolDecodeFunction( + const struct __glXDispatchInfo *dispatch_info, int opcode, + int swapped_version); + +extern int __glXGetProtocolSizeData( + const struct __glXDispatchInfo *dispatch_info, int opcode, + __GLXrenderSizeData *data); + #endif /* __GLX_INDIRECT_UTIL_H__ */ diff --git a/GL/glx/single2.c b/GL/glx/single2.c index 3387af2a2..357cd317e 100644 --- a/GL/glx/single2.c +++ b/GL/glx/single2.c @@ -392,3 +392,13 @@ int __glXDisp_GetString(__GLXclientState *cl, GLbyte *pc) { return DoGetString(cl, pc, GL_FALSE); } + +int __glXDisp_GetProgramStringARB(__GLXclientState *cl, GLbyte *pc) +{ + return BadRequest; +} + +int __glXDisp_GetProgramStringNV(__GLXclientState *cl, GLbyte *pc) +{ + return BadRequest; +} diff --git a/GL/glx/single2swap.c b/GL/glx/single2swap.c index 41a42bb0f..6d5e5ce0d 100644 --- a/GL/glx/single2swap.c +++ b/GL/glx/single2swap.c @@ -270,3 +270,13 @@ int __glXDispSwap_GetString(__GLXclientState *cl, GLbyte *pc) { return DoGetString(cl, pc, GL_TRUE); } + +int __glXDispSwap_GetProgramStringARB(__GLXclientState *cl, GLbyte *pc) +{ + return BadRequest; +} + +int __glXDispSwap_GetProgramStringNV(__GLXclientState *cl, GLbyte *pc) +{ + return BadRequest; +} diff --git a/GL/glx/singlepix.c b/GL/glx/singlepix.c index ae64db4ca..10a16b141 100644 --- a/GL/glx/singlepix.c +++ b/GL/glx/singlepix.c @@ -462,3 +462,8 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc) return Success; } + +int __glXDisp_GetCompressedTexImageARB(__GLXclientState *cl, GLbyte *pc) +{ + return BadRequest; +} diff --git a/GL/glx/singlepixswap.c b/GL/glx/singlepixswap.c index 59d1a690c..b22dc5f53 100644 --- a/GL/glx/singlepixswap.c +++ b/GL/glx/singlepixswap.c @@ -517,3 +517,8 @@ int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc) return Success; } + +int __glXDispSwap_GetCompressedTexImageARB(__GLXclientState *cl, GLbyte *pc) +{ + return BadRequest; +} diff --git a/GL/glx/xfont.c b/GL/glx/xfont.c index 89ff95b7c..b24c77d44 100644 --- a/GL/glx/xfont.c +++ b/GL/glx/xfont.c @@ -47,6 +47,7 @@ #include "glapi.h" #include "glthread.h" #include "dispatch.h" +#include "indirect_dispatch.h" #include <GL/gl.h> #include <pixmapstr.h> #include <windowstr.h> @@ -156,7 +157,7 @@ MakeBitmapsFromFont(FontPtr pFont, int first, int count, int list_base) /************************************************************************/ -int __glXUseXFont(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_UseXFont(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXUseXFontReq *req; |