summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/x11/indirect.c602
-rw-r--r--src/glx/x11/indirect.h23
-rw-r--r--src/glx/x11/indirect_init.c12
-rw-r--r--src/glx/x11/singlepix.c86
4 files changed, 571 insertions, 152 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c
index 80b6011bdd..b8678be93b 100644
--- a/src/glx/x11/indirect.c
+++ b/src/glx/x11/indirect.c
@@ -30,6 +30,8 @@
#include "indirect.h"
#include "glxclient.h"
#include "indirect_size.h"
+#include "dispatch.h"
+#include "glthread.h"
#include <GL/glxproto.h>
#ifdef USE_XCB
#include <X11/Xlib-xcb.h>
@@ -5037,6 +5039,36 @@ __indirect_glAreTexturesResident(GLsizei n, const GLuint * textures,
return retval;
}
+#define X_GLvop_AreTexturesResidentEXT 11
+GLboolean
+glAreTexturesResidentEXT(GLsizei n, const GLuint * textures,
+ GLboolean * residences)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ return CALL_AreTexturesResident(GET_DISPATCH(),
+ (n, textures, residences));
+ } else {
+ __GLXcontext *const gc = __glXGetCurrentContext();
+ Display *const dpy = gc->currentDpy;
+ GLboolean retval = (GLboolean) 0;
+ const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
+ if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+ GLubyte const *pc =
+ __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
+ X_GLvop_AreTexturesResidentEXT,
+ cmdlen);
+ (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
+ (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
+ retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ return retval;
+ }
+}
+
#define X_GLrop_CopyTexImage1D 4119
void
__indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
@@ -5124,7 +5156,7 @@ __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
}
}
-#define X_GLvop_DeleteTextures 12
+#define X_GLsop_DeleteTextures 144
void
__indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
{
@@ -5132,17 +5164,47 @@ __indirect_glDeleteTextures(GLsizei n, const GLuint * textures)
Display *const dpy = gc->currentDpy;
const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+#ifdef USE_XCB
+ xcb_connection_t *c = XGetXCBConnection(dpy);
+ (void) __glXFlushRenderBuffer(gc, gc->pc);
+ xcb_glx_delete_textures(c, gc->currentContextTag, n, textures);
+#else
GLubyte const *pc =
- __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
- X_GLvop_DeleteTextures, cmdlen);
+ __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen);
(void) memcpy((void *) (pc + 0), (void *) (&n), 4);
(void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
UnlockDisplay(dpy);
SyncHandle();
+#endif /* USE_XCB */
}
return;
}
+#define X_GLvop_DeleteTexturesEXT 12
+void
+glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_DeleteTextures(GET_DISPATCH(), (n, textures));
+ } else {
+ __GLXcontext *const gc = __glXGetCurrentContext();
+ Display *const dpy = gc->currentDpy;
+ const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
+ if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+ GLubyte const *pc =
+ __glXSetupVendorRequest(gc, X_GLXVendorPrivate,
+ X_GLvop_DeleteTexturesEXT, cmdlen);
+ (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
+ (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ return;
+ }
+}
+
#define X_GLsop_GenTextures 145
void
__indirect_glGenTextures(GLsizei n, GLuint * textures)
@@ -5176,6 +5238,31 @@ __indirect_glGenTextures(GLsizei n, GLuint * textures)
return;
}
+#define X_GLvop_GenTexturesEXT 13
+void
+glGenTexturesEXT(GLsizei n, GLuint * textures)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GenTextures(GET_DISPATCH(), (n, textures));
+ } else {
+ __GLXcontext *const gc = __glXGetCurrentContext();
+ Display *const dpy = gc->currentDpy;
+ const GLuint cmdlen = 4;
+ if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+ GLubyte const *pc =
+ __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
+ X_GLvop_GenTexturesEXT, cmdlen);
+ (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
+ (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ return;
+ }
+}
+
#define X_GLsop_IsTexture 146
GLboolean
__indirect_glIsTexture(GLuint texture)
@@ -5207,6 +5294,32 @@ __indirect_glIsTexture(GLuint texture)
return retval;
}
+#define X_GLvop_IsTextureEXT 14
+GLboolean
+glIsTextureEXT(GLuint texture)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ return CALL_IsTexture(GET_DISPATCH(), (texture));
+ } else {
+ __GLXcontext *const gc = __glXGetCurrentContext();
+ Display *const dpy = gc->currentDpy;
+ GLboolean retval = (GLboolean) 0;
+ const GLuint cmdlen = 4;
+ if (__builtin_expect(dpy != NULL, 1)) {
+ GLubyte const *pc =
+ __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
+ X_GLvop_IsTextureEXT, cmdlen);
+ (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
+ retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ return retval;
+ }
+}
+
#define X_GLrop_PrioritizeTextures 4118
void
__indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures,
@@ -5489,6 +5602,37 @@ __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type,
return;
}
+#define X_GLvop_GetColorTableSGI 4098
+void
+glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetColorTable(GET_DISPATCH(), (target, format, type, table));
+ } else {
+ __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_GLsop_GetColorTableParameterfv 148
void
__indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
@@ -5529,6 +5673,34 @@ __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname,
return;
}
+#define X_GLvop_GetColorTableParameterfvSGI 4099
+void
+glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetColorTableParameterfv(GET_DISPATCH(),
+ (target, pname, params));
+ } else {
+ __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_GLsop_GetColorTableParameteriv 149
void
__indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
@@ -5569,6 +5741,34 @@ __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname,
return;
}
+#define X_GLvop_GetColorTableParameterivSGI 4100
+void
+glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetColorTableParameteriv(GET_DISPATCH(),
+ (target, pname, params));
+ } else {
+ __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_GLrop_ColorSubTable 195
void
__indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count,
@@ -5861,6 +6061,40 @@ __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type,
return;
}
+#define X_GLvop_GetConvolutionFilterEXT 1
+void
+gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type,
+ GLvoid * image)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetConvolutionFilter(GET_DISPATCH(),
+ (target, format, type, image));
+ } else {
+ __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_GetConvolutionFilterEXT,
+ 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, 2, 0, 0, 0, format, type, image,
+ GL_TRUE);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ return;
+ }
+}
+
#define X_GLsop_GetConvolutionParameterfv 151
void
__indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
@@ -5901,6 +6135,34 @@ __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname,
return;
}
+#define X_GLvop_GetConvolutionParameterfvEXT 2
+void
+gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetConvolutionParameterfv(GET_DISPATCH(),
+ (target, pname, params));
+ } else {
+ __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_GetConvolutionParameterfvEXT,
+ 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_GLsop_GetConvolutionParameteriv 152
void
__indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
@@ -5941,6 +6203,34 @@ __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname,
return;
}
+#define X_GLvop_GetConvolutionParameterivEXT 3
+void
+gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetConvolutionParameteriv(GET_DISPATCH(),
+ (target, pname, params));
+ } else {
+ __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_GetConvolutionParameterivEXT,
+ 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_GLsop_GetHistogram 154
void
__indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format,
@@ -5987,6 +6277,40 @@ __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format,
return;
}
+#define X_GLvop_GetHistogramEXT 5
+void
+gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format,
+ GLenum type, GLvoid * values)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetHistogram(GET_DISPATCH(),
+ (target, reset, format, type, values));
+ } else {
+ __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_GetHistogramEXT, 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;
+ *(int8_t *) (pc + 13) = reset;
+ __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values,
+ GL_TRUE);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ return;
+ }
+}
+
#define X_GLsop_GetHistogramParameterfv 155
void
__indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
@@ -6026,6 +6350,33 @@ __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname,
return;
}
+#define X_GLvop_GetHistogramParameterfvEXT 6
+void
+gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetHistogramParameterfv(GET_DISPATCH(), (target, pname, params));
+ } else {
+ __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_GetHistogramParameterfvEXT,
+ 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_GLsop_GetHistogramParameteriv 156
void
__indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
@@ -6065,6 +6416,33 @@ __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname,
return;
}
+#define X_GLvop_GetHistogramParameterivEXT 7
+void
+gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetHistogramParameteriv(GET_DISPATCH(), (target, pname, params));
+ } else {
+ __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_GetHistogramParameterivEXT,
+ 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_GLsop_GetMinmax 157
void
__indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format,
@@ -6107,6 +6485,39 @@ __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format,
return;
}
+#define X_GLvop_GetMinmaxEXT 8
+void
+gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format,
+ GLenum type, GLvoid * values)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, values));
+ } else {
+ __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_GetMinmaxEXT, 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;
+ *(int8_t *) (pc + 13) = reset;
+ __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values,
+ GL_FALSE);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ return;
+ }
+}
+
#define X_GLsop_GetMinmaxParameterfv 158
void
__indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
@@ -6144,6 +6555,33 @@ __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname,
return;
}
+#define X_GLvop_GetMinmaxParameterfvEXT 9
+void
+gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetMinmaxParameterfv(GET_DISPATCH(), (target, pname, params));
+ } else {
+ __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_GetMinmaxParameterfvEXT,
+ 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_GLsop_GetMinmaxParameteriv 159
void
__indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
@@ -6180,6 +6618,33 @@ __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params)
return;
}
+#define X_GLvop_GetMinmaxParameterivEXT 10
+void
+gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
+{
+ __GLXcontext *const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetMinmaxParameteriv(GET_DISPATCH(), (target, pname, params));
+ } else {
+ __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_GetMinmaxParameterivEXT,
+ 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_GLrop_Histogram 4110
void
__indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat,
@@ -8012,137 +8477,6 @@ __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)
-{
- __GLXcontext *const gc = __glXGetCurrentContext();
- Display *const dpy = gc->currentDpy;
- GLboolean retval = (GLboolean) 0;
- const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
- if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
- GLubyte const *pc =
- __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
- X_GLvop_AreTexturesResidentEXT, cmdlen);
- (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
- (void) memcpy((void *) (pc + 4), (void *) (textures), (n * 4));
- retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_TRUE);
- UnlockDisplay(dpy);
- SyncHandle();
- }
- return retval;
-}
-
-#define X_GLvop_GenTexturesEXT 13
-void
-__indirect_glGenTexturesEXT(GLsizei n, GLuint * textures)
-{
- __GLXcontext *const gc = __glXGetCurrentContext();
- Display *const dpy = gc->currentDpy;
- const GLuint cmdlen = 4;
- if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
- GLubyte const *pc =
- __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
- X_GLvop_GenTexturesEXT, cmdlen);
- (void) memcpy((void *) (pc + 0), (void *) (&n), 4);
- (void) __glXReadReply(dpy, 4, textures, GL_TRUE);
- UnlockDisplay(dpy);
- SyncHandle();
- }
- return;
-}
-
-#define X_GLvop_IsTextureEXT 14
-GLboolean
-__indirect_glIsTextureEXT(GLuint texture)
-{
- __GLXcontext *const gc = __glXGetCurrentContext();
- Display *const dpy = gc->currentDpy;
- GLboolean retval = (GLboolean) 0;
- const GLuint cmdlen = 4;
- if (__builtin_expect(dpy != NULL, 1)) {
- GLubyte const *pc =
- __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
- X_GLvop_IsTextureEXT, cmdlen);
- (void) memcpy((void *) (pc + 0), (void *) (&texture), 4);
- retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
- UnlockDisplay(dpy);
- SyncHandle();
- }
- return retval;
-}
-
#define X_GLrop_SampleMaskSGIS 2048
void
__indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert)
diff --git a/src/glx/x11/indirect.h b/src/glx/x11/indirect.h
index 2e953ca011..e5b1fadf2b 100644
--- a/src/glx/x11/indirect.h
+++ b/src/glx/x11/indirect.h
@@ -392,14 +392,18 @@ extern HIDDEN void __indirect_glPolygonOffset(GLfloat factor, GLfloat units);
extern HIDDEN void __indirect_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
extern HIDDEN void __indirect_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
extern HIDDEN GLboolean __indirect_glAreTexturesResident(GLsizei n, const GLuint * textures, GLboolean * residences);
+GLAPI GLboolean GLAPIENTRY glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences);
extern HIDDEN void __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
extern HIDDEN void __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
extern HIDDEN void __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
extern HIDDEN void __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
extern HIDDEN void __indirect_glDeleteTextures(GLsizei n, const GLuint * textures);
+GLAPI void GLAPIENTRY glDeleteTexturesEXT(GLsizei n, const GLuint * textures);
extern HIDDEN void __indirect_glGenTextures(GLsizei n, GLuint * textures);
+GLAPI void GLAPIENTRY glGenTexturesEXT(GLsizei n, GLuint * textures);
extern HIDDEN void __indirect_glGetPointerv(GLenum pname, GLvoid ** params);
extern HIDDEN GLboolean __indirect_glIsTexture(GLuint texture);
+GLAPI GLboolean GLAPIENTRY glIsTextureEXT(GLuint texture);
extern HIDDEN void __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclampf * priorities);
extern HIDDEN void __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels);
extern HIDDEN void __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels);
@@ -413,8 +417,11 @@ extern HIDDEN void __indirect_glColorTableParameterfv(GLenum target, GLenum pnam
extern HIDDEN void __indirect_glColorTableParameteriv(GLenum target, GLenum pname, const GLint * params);
extern HIDDEN void __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
extern HIDDEN void __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table);
+GLAPI void GLAPIENTRY glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table);
extern HIDDEN void __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * params);
+GLAPI void GLAPIENTRY glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params);
extern HIDDEN void __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint * params);
+GLAPI void GLAPIENTRY glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data);
extern HIDDEN void __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
extern HIDDEN void __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image);
@@ -426,16 +433,26 @@ extern HIDDEN void __indirect_glConvolutionParameteriv(GLenum target, GLenum pna
extern HIDDEN void __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
extern HIDDEN void __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
extern HIDDEN void __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image);
+extern HIDDEN void gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid * image);
extern HIDDEN void __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * params);
+extern HIDDEN void gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params);
extern HIDDEN void __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint * params);
+extern HIDDEN void gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span);
+extern HIDDEN void gl_dispatch_stub_359(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span);
extern HIDDEN void __indirect_glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column);
extern HIDDEN void __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
+extern HIDDEN void gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
extern HIDDEN void __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * params);
+extern HIDDEN void gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params);
extern HIDDEN void __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint * params);
+extern HIDDEN void gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
+extern HIDDEN void gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
extern HIDDEN void __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params);
+extern HIDDEN void gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params);
extern HIDDEN void __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params);
+extern HIDDEN void gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
extern HIDDEN void __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink);
extern HIDDEN void __indirect_glResetHistogram(GLenum target);
@@ -555,12 +572,6 @@ 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);
extern HIDDEN void __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert);
extern HIDDEN void __indirect_glSamplePatternSGIS(GLenum pattern);
extern HIDDEN void __indirect_glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
diff --git a/src/glx/x11/indirect_init.c b/src/glx/x11/indirect_init.c
index b8e2617691..aaa70c8796 100644
--- a/src/glx/x11/indirect_init.c
+++ b/src/glx/x11/indirect_init.c
@@ -588,18 +588,6 @@ __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;
- glAPI->GenTexturesEXT = __indirect_glGenTexturesEXT;
- glAPI->IsTextureEXT = __indirect_glIsTextureEXT;
-
/* 25. GL_SGIS_multisample */
glAPI->SampleMaskSGIS = __indirect_glSampleMaskSGIS;
diff --git a/src/glx/x11/singlepix.c b/src/glx/x11/singlepix.c
index 4a10083b8f..5eeb4cedab 100644
--- a/src/glx/x11/singlepix.c
+++ b/src/glx/x11/singlepix.c
@@ -36,6 +36,10 @@
#include "packsingle.h"
#include "indirect.h"
+#include "dispatch.h"
+#include "glthread.h"
+#include "glapioffsets.h"
+#include <GL/glxproto.h>
void __indirect_glGetSeparableFilter(GLenum target, GLenum format, GLenum type,
GLvoid *row, GLvoid *column, GLvoid *span)
@@ -103,3 +107,85 @@ void __indirect_glGetSeparableFilter(GLenum target, GLenum format, GLenum type,
__GLX_SINGLE_END();
}
+
+
+#define CONCAT(a,b) a ## b
+#define NAME(o) CONCAT(gl_dispatch_stub_, o)
+
+void NAME(_gloffset_GetSeparableFilter)(GLenum target, GLenum format, GLenum type,
+ GLvoid *row, GLvoid *column, GLvoid *span)
+{
+ __GLXcontext * const gc = __glXGetCurrentContext();
+
+ if (gc->isDirect) {
+ CALL_GetSeparableFilter(GET_DISPATCH(),
+ (target, format, type, row, column, span));
+ return;
+ }
+ else {
+ Display *const dpy = gc->currentDpy;
+ const GLuint cmdlen = __GLX_PAD(13);
+
+ if (dpy != NULL) {
+ const __GLXattribute * const state = gc->client_state_private;
+ xGLXGetSeparableFilterReply reply;
+ GLubyte const *pc =
+ __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
+ X_GLvop_GetSeparableFilterEXT, cmdlen);
+ unsigned compsize;
+
+
+ (void) memcpy((void *) (pc + 0), (void *) (&target), 4);
+ (void) memcpy((void *) (pc + 4), (void *) (&format), 4);
+ (void) memcpy((void *) (pc + 8), (void *) (&type), 4);
+ *(int8_t *) (pc + 12) = state->storePack.swapEndian;
+
+ (void) _XReply(dpy, (xReply *) & reply, 0, False);
+
+ compsize = reply.length << 2;
+
+ if (compsize != 0) {
+ const GLint width = reply.width;
+ const GLint height = reply.height;
+ const GLint widthsize =
+ __glImageSize(width, 1, 1, format, type, 0);
+ const GLint heightsize =
+ __glImageSize(height, 1, 1, format, type, 0);
+ GLubyte * const buf =
+ (GLubyte*) Xmalloc((widthsize > heightsize) ? widthsize : heightsize);
+
+ if (buf == NULL) {
+ /* Throw data away */
+ _XEatData(dpy, compsize);
+ __glXSetError(gc, GL_OUT_OF_MEMORY);
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return;
+ } else {
+ int extra;
+
+ extra = 4 - (widthsize & 3);
+ _XRead(dpy, (char *)buf, widthsize);
+ if (extra < 4) {
+ _XEatData(dpy, extra);
+ }
+
+ __glEmptyImage(gc, 1, width, 1, 1, format, type, buf,
+ row);
+
+ extra = 4 - (heightsize & 3);
+ _XRead(dpy, (char *)buf, heightsize);
+ if (extra < 4) {
+ _XEatData(dpy, extra);
+ }
+
+ __glEmptyImage(gc, 1, height, 1, 1, format, type, buf,
+ column);
+
+ Xfree((char*) buf);
+ }
+ }
+ }
+ }
+}