aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/x11/indirect.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2006-08-24 21:42:38 +0000
committerIan Romanick <[email protected]>2006-08-24 21:42:38 +0000
commita5f2206077402f0a8700ec1348e09731e53c5bc2 (patch)
tree6de5fbc0d45deb5ef1418a078c2077d52ec24b48 /src/glx/x11/indirect.c
parentbf83e652f6d023f1cdcf83ec3ebac024dc0032dc (diff)
GL_EXT_paletted_texture functions should alias GL_SGI_color_table functions.
The functions for GL_EXT_paletted_texture that do not share GLX protocol with GL_ARB_imaging are supposed to alias the similar functions from GL_SGI_color_table. They didn't. This patch corrects this problem and enables GLX protocol for both extensions. Since this removes 3 entries from the dispatch table, this change creates a lot of changes in the generated files.
Diffstat (limited to 'src/glx/x11/indirect.c')
-rw-r--r--src/glx/x11/indirect.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c
index 030b4a8e8a1..01d086cb90c 100644
--- a/src/glx/x11/indirect.c
+++ b/src/glx/x11/indirect.c
@@ -6765,6 +6765,61 @@ __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
}
}
+#define X_GLvop_GetColorTableParameterfvSGI 4099
+void
+__indirect_glGetColorTableParameterfvSGI(GLenum target, GLenum pname, GLfloat * params)
+{
+ __GLXcontext * const gc = __glXGetCurrentContext();
+ Display * const dpy = gc->currentDpy;
+ const GLuint cmdlen = 8;
+ if (__builtin_expect(dpy != NULL, 1)) {
+ GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableParameterfvSGI, cmdlen);
+ (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+ (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+ (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+ UnlockDisplay(dpy); SyncHandle();
+ }
+ return;
+}
+
+#define X_GLvop_GetColorTableParameterivSGI 4100
+void
+__indirect_glGetColorTableParameterivSGI(GLenum target, GLenum pname, GLint * params)
+{
+ __GLXcontext * const gc = __glXGetCurrentContext();
+ Display * const dpy = gc->currentDpy;
+ const GLuint cmdlen = 8;
+ if (__builtin_expect(dpy != NULL, 1)) {
+ GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableParameterivSGI, cmdlen);
+ (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+ (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+ (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+ UnlockDisplay(dpy); SyncHandle();
+ }
+ return;
+}
+
+#define X_GLvop_GetColorTableSGI 4098
+void
+__indirect_glGetColorTableSGI(GLenum target, GLenum format, GLenum type, GLvoid * table)
+{
+ __GLXcontext * const gc = __glXGetCurrentContext();
+ const __GLXattribute * const state = gc->client_state_private;
+ Display * const dpy = gc->currentDpy;
+ const GLuint cmdlen = 16;
+ if (__builtin_expect(dpy != NULL, 1)) {
+ GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableSGI, cmdlen);
+ (void) memcpy((void *)(pc + 0), (void *)(&target), 4);
+ (void) memcpy((void *)(pc + 4), (void *)(&format), 4);
+ (void) memcpy((void *)(pc + 8), (void *)(&type), 4);
+ *(int32_t *)(pc + 12) = 0;
+ * (int8_t *)(pc + 12) = state->storePack.swapEndian;
+ __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE);
+ UnlockDisplay(dpy); SyncHandle();
+ }
+ return;
+}
+
#define X_GLvop_AreTexturesResidentEXT 11
GLboolean
__indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences)