summaryrefslogtreecommitdiffstats
path: root/src/glx/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/x11')
-rw-r--r--src/glx/x11/glxextensions.c1
-rw-r--r--src/glx/x11/glxextensions.h1
-rw-r--r--src/glx/x11/indirect.c55
-rw-r--r--src/glx/x11/indirect.h3
-rw-r--r--src/glx/x11/indirect_init.c26
5 files changed, 76 insertions, 10 deletions
diff --git a/src/glx/x11/glxextensions.c b/src/glx/x11/glxextensions.c
index d00bdbb2501..aefd57c2b9d 100644
--- a/src/glx/x11/glxextensions.c
+++ b/src/glx/x11/glxextensions.c
@@ -226,6 +226,7 @@ static const struct extension_info known_gl_extensions[] = {
{ GL(OES_read_format), VER(0,0), Y, N, N, N },
{ GL(OES_compressed_paletted_texture),VER(0,0), Y, N, N, N },
{ GL(SGI_color_matrix), VER(0,0), Y, N, N, N },
+ { GL(SGI_color_table), VER(0,0), Y, N, N, N },
{ GL(SGI_texture_color_table), VER(0,0), Y, N, N, N },
{ GL(SGIS_generate_mipmap), VER(1,4), Y, N, N, N },
{ GL(SGIS_multisample), VER(0,0), Y, N, N, N },
diff --git a/src/glx/x11/glxextensions.h b/src/glx/x11/glxextensions.h
index e25332595b2..9e7f0fb4ba3 100644
--- a/src/glx/x11/glxextensions.h
+++ b/src/glx/x11/glxextensions.h
@@ -180,6 +180,7 @@ enum {
GL_OES_compressed_paletted_texture_bit,
GL_OES_read_format_bit,
GL_SGI_color_matrix_bit,
+ GL_SGI_color_table_bit,
GL_SGI_texture_color_table_bit,
GL_SGIS_generate_mipmap_bit,
GL_SGIS_multisample_bit,
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)
diff --git a/src/glx/x11/indirect.h b/src/glx/x11/indirect.h
index 786a7c74e80..decfda298a4 100644
--- a/src/glx/x11/indirect.h
+++ b/src/glx/x11/indirect.h
@@ -555,6 +555,9 @@ extern HIDDEN void __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GL
extern HIDDEN void __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params);
extern HIDDEN GLboolean __indirect_glIsQueryARB(GLuint id);
extern HIDDEN void __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs);
+extern HIDDEN void __indirect_glGetColorTableParameterfvSGI(GLenum target, GLenum pname, GLfloat * params);
+extern HIDDEN void __indirect_glGetColorTableParameterivSGI(GLenum target, GLenum pname, GLint * params);
+extern HIDDEN void __indirect_glGetColorTableSGI(GLenum target, GLenum format, GLenum type, GLvoid * table);
extern HIDDEN GLboolean __indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences);
extern HIDDEN void __indirect_glGenTexturesEXT(GLsizei n, GLuint * textures);
extern HIDDEN GLboolean __indirect_glIsTextureEXT(GLuint texture);
diff --git a/src/glx/x11/indirect_init.c b/src/glx/x11/indirect_init.c
index 66827efa638..5c1de7c56bc 100644
--- a/src/glx/x11/indirect_init.c
+++ b/src/glx/x11/indirect_init.c
@@ -588,6 +588,12 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->DrawBuffersARB = __indirect_glDrawBuffersARB;
+ /* 14. GL_SGI_color_table */
+
+ glAPI->GetColorTableParameterfvSGI = __indirect_glGetColorTableParameterfvSGI;
+ glAPI->GetColorTableParameterivSGI = __indirect_glGetColorTableParameterivSGI;
+ glAPI->GetColorTableSGI = __indirect_glGetColorTableSGI;
+
/* 20. GL_EXT_texture_object */
glAPI->AreTexturesResidentEXT = __indirect_glAreTexturesResidentEXT;
@@ -635,16 +641,16 @@ __GLapi * __glXNewIndirectAPI( void )
/* 148. GL_EXT_multi_draw_arrays */
- glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElementsEXT;
glAPI->MultiDrawArraysEXT = __indirect_glMultiDrawArraysEXT;
+ glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElementsEXT;
/* 149. GL_EXT_fog_coord */
- glAPI->FogCoordPointerEXT = __indirect_glFogCoordPointerEXT;
- glAPI->FogCoorddEXT = __indirect_glFogCoorddEXT;
glAPI->FogCoorddvEXT = __indirect_glFogCoorddvEXT;
glAPI->FogCoordfEXT = __indirect_glFogCoordfEXT;
glAPI->FogCoordfvEXT = __indirect_glFogCoordfvEXT;
+ glAPI->FogCoordPointerEXT = __indirect_glFogCoordPointerEXT;
+ glAPI->FogCoorddEXT = __indirect_glFogCoorddEXT;
/* 173. GL_EXT_blend_func_separate */
@@ -652,9 +658,6 @@ __GLapi * __glXNewIndirectAPI( void )
/* 197. GL_MESA_window_pos */
- glAPI->WindowPos3ivMESA = __indirect_glWindowPos3ivMESA;
- glAPI->WindowPos3sMESA = __indirect_glWindowPos3sMESA;
- glAPI->WindowPos3svMESA = __indirect_glWindowPos3svMESA;
glAPI->WindowPos2dMESA = __indirect_glWindowPos2dMESA;
glAPI->WindowPos2dvMESA = __indirect_glWindowPos2dvMESA;
glAPI->WindowPos2fMESA = __indirect_glWindowPos2fMESA;
@@ -668,6 +671,9 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->WindowPos3fMESA = __indirect_glWindowPos3fMESA;
glAPI->WindowPos3fvMESA = __indirect_glWindowPos3fvMESA;
glAPI->WindowPos3iMESA = __indirect_glWindowPos3iMESA;
+ glAPI->WindowPos3ivMESA = __indirect_glWindowPos3ivMESA;
+ glAPI->WindowPos3sMESA = __indirect_glWindowPos3sMESA;
+ glAPI->WindowPos3svMESA = __indirect_glWindowPos3svMESA;
/* 233. GL_NV_vertex_program */
@@ -738,8 +744,8 @@ __GLapi * __glXNewIndirectAPI( void )
/* 262. GL_NV_point_sprite */
- glAPI->PointParameteriNV = __indirect_glPointParameteriNV;
glAPI->PointParameterivNV = __indirect_glPointParameterivNV;
+ glAPI->PointParameteriNV = __indirect_glPointParameteriNV;
/* 268. GL_EXT_stencil_two_side */
@@ -756,9 +762,6 @@ __GLapi * __glXNewIndirectAPI( void )
/* 310. GL_EXT_framebuffer_object */
- glAPI->GetRenderbufferParameterivEXT = __indirect_glGetRenderbufferParameterivEXT;
- glAPI->IsFramebufferEXT = __indirect_glIsFramebufferEXT;
- glAPI->IsRenderbufferEXT = __indirect_glIsRenderbufferEXT;
glAPI->RenderbufferStorageEXT = __indirect_glRenderbufferStorageEXT;
glAPI->BindFramebufferEXT = __indirect_glBindFramebufferEXT;
glAPI->BindRenderbufferEXT = __indirect_glBindRenderbufferEXT;
@@ -773,6 +776,9 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->GenRenderbuffersEXT = __indirect_glGenRenderbuffersEXT;
glAPI->GenerateMipmapEXT = __indirect_glGenerateMipmapEXT;
glAPI->GetFramebufferAttachmentParameterivEXT = __indirect_glGetFramebufferAttachmentParameterivEXT;
+ glAPI->GetRenderbufferParameterivEXT = __indirect_glGetRenderbufferParameterivEXT;
+ glAPI->IsFramebufferEXT = __indirect_glIsFramebufferEXT;
+ glAPI->IsRenderbufferEXT = __indirect_glIsRenderbufferEXT;
return glAPI;
}