summaryrefslogtreecommitdiff
path: root/GL/glx
diff options
context:
space:
mode:
authorIan Romanick <idr@umwelt.(none)>2006-08-24 14:54:49 -0700
committerIan Romanick <idr@umwelt.(none)>2006-08-24 14:54:49 -0700
commit2c865277fe1d056981d1020e1af001d2319252c0 (patch)
treed18df2d15459443caee1c778ed8e9ebe7330a5f4 /GL/glx
parent7d5de5c6657304246473d7ddd5c29bb0c7a3bc34 (diff)
Regenerate from gl_API.xml 1.63. Enable extensions.
gl_API.xml 1.63 corrects some problems with GLX protocol for GL_EXT_paletted_texture and GL_SGI_color_table. Regenerate from that file, and enable those extensions and GL_EXT_shared_texture_palette.
Diffstat (limited to 'GL/glx')
-rw-r--r--GL/glx/glxscreens.c3
-rw-r--r--GL/glx/indirect_dispatch.c58
-rw-r--r--GL/glx/indirect_dispatch.h6
-rw-r--r--GL/glx/indirect_dispatch_swap.c60
-rw-r--r--GL/glx/indirect_table.c151
5 files changed, 220 insertions, 58 deletions
diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c
index 40de9ee25..763e55ed7 100644
--- a/GL/glx/glxscreens.c
+++ b/GL/glx/glxscreens.c
@@ -81,12 +81,14 @@ static const char GLServerExtensions[] =
"GL_EXT_framebuffer_object "
"GL_EXT_multi_draw_arrays "
"GL_EXT_packed_pixels "
+ "GL_EXT_paletted_texture "
"GL_EXT_point_parameters "
"GL_EXT_polygon_offset "
"GL_EXT_rescale_normal "
"GL_EXT_secondary_color "
"GL_EXT_separate_specular_color "
"GL_EXT_shadow_funcs "
+ "GL_EXT_shared_texture_palette "
"GL_EXT_stencil_two_side "
"GL_EXT_stencil_wrap "
"GL_EXT_subtexture "
@@ -122,6 +124,7 @@ static const char GLServerExtensions[] =
"GL_NV_texture_expand_normal "
"GL_NV_texture_rectangle "
"GL_SGI_color_matrix "
+ "GL_SGI_color_table "
"GL_SGIS_generate_mipmap "
"GL_SGIS_multisample "
"GL_SGIS_point_parameters "
diff --git a/GL/glx/indirect_dispatch.c b/GL/glx/indirect_dispatch.c
index 142eba2a1..9c2b7b12b 100644
--- a/GL/glx/indirect_dispatch.c
+++ b/GL/glx/indirect_dispatch.c
@@ -4414,6 +4414,64 @@ void __glXDisp_DrawBuffersARB(GLbyte * pc)
) );
}
+int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ int error;
+ __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+
+ pc += __GLX_VENDPRIV_HDR_SIZE;
+ if ( cx != NULL ) {
+ const GLenum pname = *(GLenum *)(pc + 4);
+
+ const GLuint compsize = __glGetColorTableParameterfvSGI_size(pname);
+ GLfloat answerBuffer[200];
+ GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+
+ if (params == NULL) return BadAlloc;
+ __glXClearErrorOccured();
+
+ CALL_GetColorTableParameterfvSGI( GET_DISPATCH(), (
+ *(GLenum *)(pc + 0),
+ pname,
+ params
+ ) );
+ __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
+ error = Success;
+ }
+
+ return error;
+}
+
+int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ int error;
+ __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+
+ pc += __GLX_VENDPRIV_HDR_SIZE;
+ if ( cx != NULL ) {
+ const GLenum pname = *(GLenum *)(pc + 4);
+
+ const GLuint compsize = __glGetColorTableParameterivSGI_size(pname);
+ GLint answerBuffer[200];
+ GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+
+ if (params == NULL) return BadAlloc;
+ __glXClearErrorOccured();
+
+ CALL_GetColorTableParameterivSGI( GET_DISPATCH(), (
+ *(GLenum *)(pc + 0),
+ pname,
+ params
+ ) );
+ __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
+ error = Success;
+ }
+
+ return error;
+}
+
int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
diff --git a/GL/glx/indirect_dispatch.h b/GL/glx/indirect_dispatch.h
index e2c0c4145..a0da3e505 100644
--- a/GL/glx/indirect_dispatch.h
+++ b/GL/glx/indirect_dispatch.h
@@ -61,6 +61,8 @@ extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc);
+extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Histogram(GLbyte * pc);
@@ -631,6 +633,8 @@ 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 int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc);
extern HIDDEN void __glXDisp_Lightf(GLbyte * pc);
@@ -767,6 +771,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_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc);
diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c
index 0c732e2ae..06c1d0363 100644
--- a/GL/glx/indirect_dispatch_swap.c
+++ b/GL/glx/indirect_dispatch_swap.c
@@ -4566,6 +4566,66 @@ void __glXDispSwap_DrawBuffersARB(GLbyte * pc)
) );
}
+int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ int error;
+ __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+
+ pc += __GLX_VENDPRIV_HDR_SIZE;
+ if ( cx != NULL ) {
+ const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+
+ const GLuint compsize = __glGetColorTableParameterfvSGI_size(pname);
+ GLfloat answerBuffer[200];
+ GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+
+ if (params == NULL) return BadAlloc;
+ __glXClearErrorOccured();
+
+ CALL_GetColorTableParameterfvSGI( GET_DISPATCH(), (
+ (GLenum )bswap_ENUM ( pc + 0 ),
+ pname,
+ params
+ ) );
+ (void) bswap_32_array( (uint32_t *) params, compsize );
+ __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
+ error = Success;
+ }
+
+ return error;
+}
+
+int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ int error;
+ __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+
+ pc += __GLX_VENDPRIV_HDR_SIZE;
+ if ( cx != NULL ) {
+ const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+
+ const GLuint compsize = __glGetColorTableParameterivSGI_size(pname);
+ GLint answerBuffer[200];
+ GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+
+ if (params == NULL) return BadAlloc;
+ __glXClearErrorOccured();
+
+ CALL_GetColorTableParameterivSGI( GET_DISPATCH(), (
+ (GLenum )bswap_ENUM ( pc + 0 ),
+ pname,
+ params
+ ) );
+ (void) bswap_32_array( (uint32_t *) params, compsize );
+ __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
+ error = Success;
+ }
+
+ return error;
+}
+
int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
diff --git a/GL/glx/indirect_table.c b/GL/glx/indirect_table.c
index ec69234a0..8671a8475 100644
--- a/GL/glx/indirect_table.c
+++ b/GL/glx/indirect_table.c
@@ -1207,12 +1207,12 @@ const struct __glXDispatchInfo Render_dispatch_info = {
/*****************************************************************/
/* tree depth = 13 */
-static const int_fast16_t VendorPriv_dispatch_tree[138] = {
+static const int_fast16_t VendorPriv_dispatch_tree[155] = {
/* [0] -> opcode range [0, 131072], node depth 1 */
2,
5,
EMPTY_LEAF,
- 102,
+ 119,
EMPTY_LEAF,
/* [5] -> opcode range [0, 32768], node depth 2 */
@@ -1331,108 +1331,135 @@ static const int_fast16_t VendorPriv_dispatch_tree[138] = {
EMPTY_LEAF,
/* [78] -> opcode range [4096, 6144], node depth 5 */
+ 2,
+ 83,
+ EMPTY_LEAF,
+ 101,
+ EMPTY_LEAF,
+
+ /* [83] -> opcode range [4096, 4608], node depth 6 */
1,
+ 86,
EMPTY_LEAF,
- 81,
- /* [81] -> opcode range [5120, 6144], node depth 6 */
+ /* [86] -> opcode range [4096, 4352], node depth 7 */
1,
- 84,
+ 89,
EMPTY_LEAF,
- /* [84] -> opcode range [5120, 5632], node depth 7 */
+ /* [89] -> opcode range [4096, 4224], node depth 8 */
1,
- 87,
+ 92,
EMPTY_LEAF,
- /* [87] -> opcode range [5120, 5376], node depth 8 */
+ /* [92] -> opcode range [4096, 4160], node depth 9 */
1,
- 90,
+ 95,
EMPTY_LEAF,
- /* [90] -> opcode range [5120, 5248], node depth 9 */
+ /* [95] -> opcode range [4096, 4128], node depth 10 */
1,
- 93,
+ 98,
EMPTY_LEAF,
- /* [93] -> opcode range [5120, 5184], node depth 10 */
+ /* [98] -> opcode range [4096, 4112], node depth 11 */
1,
+ LEAF(56),
EMPTY_LEAF,
- 96,
- /* [96] -> opcode range [5152, 5184], node depth 11 */
+ /* [101] -> opcode range [5120, 5632], node depth 6 */
1,
- 99,
+ 104,
EMPTY_LEAF,
- /* [99] -> opcode range [5152, 5168], node depth 12 */
+ /* [104] -> opcode range [5120, 5376], node depth 7 */
1,
- LEAF(56),
+ 107,
EMPTY_LEAF,
- /* [102] -> opcode range [65536, 98304], node depth 2 */
+ /* [107] -> opcode range [5120, 5248], node depth 8 */
1,
- 105,
+ 110,
EMPTY_LEAF,
- /* [105] -> opcode range [65536, 81920], node depth 3 */
+ /* [110] -> opcode range [5120, 5184], node depth 9 */
1,
- 108,
EMPTY_LEAF,
+ 113,
- /* [108] -> opcode range [65536, 73728], node depth 4 */
+ /* [113] -> opcode range [5152, 5184], node depth 10 */
1,
- 111,
+ 116,
EMPTY_LEAF,
- /* [111] -> opcode range [65536, 69632], node depth 5 */
+ /* [116] -> opcode range [5152, 5168], node depth 11 */
1,
- 114,
+ LEAF(64),
EMPTY_LEAF,
- /* [114] -> opcode range [65536, 67584], node depth 6 */
+ /* [119] -> opcode range [65536, 98304], node depth 2 */
1,
- 117,
+ 122,
EMPTY_LEAF,
- /* [117] -> opcode range [65536, 66560], node depth 7 */
+ /* [122] -> opcode range [65536, 81920], node depth 3 */
1,
- 120,
+ 125,
EMPTY_LEAF,
- /* [120] -> opcode range [65536, 66048], node depth 8 */
+ /* [125] -> opcode range [65536, 73728], node depth 4 */
1,
- 123,
+ 128,
EMPTY_LEAF,
- /* [123] -> opcode range [65536, 65792], node depth 9 */
+ /* [128] -> opcode range [65536, 69632], node depth 5 */
1,
- 126,
+ 131,
EMPTY_LEAF,
- /* [126] -> opcode range [65536, 65664], node depth 10 */
+ /* [131] -> opcode range [65536, 67584], node depth 6 */
1,
- 129,
+ 134,
EMPTY_LEAF,
- /* [129] -> opcode range [65536, 65600], node depth 11 */
+ /* [134] -> opcode range [65536, 66560], node depth 7 */
1,
- 132,
+ 137,
EMPTY_LEAF,
- /* [132] -> opcode range [65536, 65568], node depth 12 */
+ /* [137] -> opcode range [65536, 66048], node depth 8 */
1,
- 135,
+ 140,
EMPTY_LEAF,
- /* [135] -> opcode range [65536, 65552], node depth 13 */
+ /* [140] -> opcode range [65536, 65792], node depth 9 */
1,
- LEAF(64),
+ 143,
+ EMPTY_LEAF,
+
+ /* [143] -> opcode range [65536, 65664], node depth 10 */
+ 1,
+ 146,
+ EMPTY_LEAF,
+
+ /* [146] -> opcode range [65536, 65600], node depth 11 */
+ 1,
+ 149,
+ EMPTY_LEAF,
+
+ /* [149] -> opcode range [65536, 65568], node depth 12 */
+ 1,
+ 152,
+ EMPTY_LEAF,
+
+ /* [152] -> opcode range [65536, 65552], node depth 13 */
+ 1,
+ LEAF(72),
EMPTY_LEAF,
};
-static const void *VendorPriv_function_table[72][2] = {
+static const void *VendorPriv_function_table[80][2] = {
/* [ 0] = 8 */ {NULL, NULL},
/* [ 1] = 9 */ {NULL, NULL},
/* [ 2] = 10 */ {NULL, NULL},
@@ -1489,22 +1516,30 @@ static const void *VendorPriv_function_table[72][2] = {
/* [ 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 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA},
- /* [ 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},
+ /* [ 56] = 4096 */ {NULL, NULL},
+ /* [ 57] = 4097 */ {NULL, NULL},
+ /* [ 58] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI},
+ /* [ 59] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI},
+ /* [ 60] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI},
+ /* [ 61] = 4101 */ {NULL, NULL},
+ /* [ 62] = 4102 */ {NULL, NULL},
+ /* [ 63] = 4103 */ {NULL, NULL},
+ /* [ 64] = 5152 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT},
+ /* [ 65] = 5153 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT},
+ /* [ 66] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA},
+ /* [ 67] = 5155 */ {NULL, NULL},
+ /* [ 68] = 5156 */ {NULL, NULL},
+ /* [ 69] = 5157 */ {NULL, NULL},
+ /* [ 70] = 5158 */ {NULL, NULL},
+ /* [ 71] = 5159 */ {NULL, NULL},
+ /* [ 72] = 65536 */ {NULL, NULL},
+ /* [ 73] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI},
+ /* [ 74] = 65538 */ {NULL, NULL},
+ /* [ 75] = 65539 */ {NULL, NULL},
+ /* [ 76] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX},
+ /* [ 77] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX},
+ /* [ 78] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX},
+ /* [ 79] = 65543 */ {NULL, NULL},
};
const struct __glXDispatchInfo VendorPriv_dispatch_info = {