summaryrefslogtreecommitdiff
path: root/src/glx/x11/indirect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/x11/indirect.c')
-rw-r--r--src/glx/x11/indirect.c154
1 files changed, 154 insertions, 0 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c
index c654c93939..4d564c12d5 100644
--- a/src/glx/x11/indirect.c
+++ b/src/glx/x11/indirect.c
@@ -5451,6 +5451,35 @@ __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert)
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
+#define X_GLrop_DrawBuffersARB 233
+void
+__indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs)
+{
+ __GLXcontext * const gc = __glXGetCurrentContext();
+ const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
+ if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
+ if (cmdlen <= gc->maxSmallRenderCommandSize) {
+ if ( (gc->pc + cmdlen) > gc->bufEnd ) {
+ (void) __glXFlushRenderBuffer(gc, gc->pc);
+ }
+ emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen);
+ (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4);
+ (void) memcpy((void *)(gc->pc + 8), (void *)(bufs), (n * 4));
+ gc->pc += cmdlen;
+ if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+ }
+ else {
+ const GLint op = X_GLrop_DrawBuffersARB;
+ const GLuint cmdlenLarge = cmdlen + 4;
+ GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);
+ (void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);
+ (void) memcpy((void *)(pc + 4), (void *)(&op), 4);
+ (void) memcpy((void *)(pc + 8), (void *)(&n), 4);
+ __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4));
+ }
+ }
+}
+
#define X_GLvop_AreTexturesResidentEXT 11
GLboolean
__indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences)
@@ -7145,6 +7174,131 @@ __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte
return;
}
+#define X_GLsop_GenQueriesARB 162
+void
+__indirect_glGenQueriesARB(GLsizei n, GLuint * ids)
+{
+ __GLXcontext * const gc = __glXGetCurrentContext();
+ Display * const dpy = gc->currentDpy;
+ const GLuint cmdlen = 4;
+ if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
+ GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen);
+ (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
+ (void) __glXReadReply(dpy, 4, ids, GL_FALSE);
+ UnlockDisplay(dpy); SyncHandle();
+ }
+ return;
+}
+
+#define X_GLsop_DeleteQueriesARB 161
+void
+__indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids)
+{
+ __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 = __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen);
+ (void) memcpy((void *)(pc + 0), (void *)(&n), 4);
+ (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4));
+ UnlockDisplay(dpy); SyncHandle();
+ }
+ return;
+}
+
+#define X_GLsop_IsQueryARB 163
+GLboolean
+__indirect_glIsQueryARB(GLuint id)
+{
+ __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 = __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen);
+ (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
+ retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE);
+ UnlockDisplay(dpy); SyncHandle();
+ }
+ return retval;
+}
+
+#define X_GLrop_BeginQueryARB 231
+void
+__indirect_glBeginQueryARB(GLenum target, GLuint id)
+{
+ __GLXcontext * const gc = __glXGetCurrentContext();
+ const GLuint cmdlen = 12;
+ emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen);
+ (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+ (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4);
+ gc->pc += cmdlen;
+ if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLrop_EndQueryARB 232
+void
+__indirect_glEndQueryARB(GLenum target)
+{
+ __GLXcontext * const gc = __glXGetCurrentContext();
+ const GLuint cmdlen = 8;
+ emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen);
+ (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+ gc->pc += cmdlen;
+ if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
+}
+
+#define X_GLsop_GetQueryivARB 164
+void
+__indirect_glGetQueryivARB(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 = __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, 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_GetQueryObjectivARB 165
+void
+__indirect_glGetQueryObjectivARB(GLuint id, 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 = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen);
+ (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
+ (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+ (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+ UnlockDisplay(dpy); SyncHandle();
+ }
+ return;
+}
+
+#define X_GLsop_GetQueryObjectuivARB 166
+void
+__indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params)
+{
+ __GLXcontext * const gc = __glXGetCurrentContext();
+ Display * const dpy = gc->currentDpy;
+ const GLuint cmdlen = 8;
+ if (__builtin_expect(dpy != NULL, 1)) {
+ GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen);
+ (void) memcpy((void *)(pc + 0), (void *)(&id), 4);
+ (void) memcpy((void *)(pc + 4), (void *)(&pname), 4);
+ (void) __glXReadReply(dpy, 4, params, GL_FALSE);
+ UnlockDisplay(dpy); SyncHandle();
+ }
+ return;
+}
+
#define X_GLvop_GetVertexAttribdvNV 1301
void
__indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params)