diff options
Diffstat (limited to 'src/glx/x11/indirect.c')
-rw-r--r-- | src/glx/x11/indirect.c | 463 |
1 files changed, 364 insertions, 99 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c index 5b54b3708c..820d5df04b 100644 --- a/src/glx/x11/indirect.c +++ b/src/glx/x11/indirect.c @@ -4401,7 +4401,7 @@ __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } -#define X_GLsop_DeleteTextures 144 +#define X_GLvop_DeleteTextures 12 void __indirect_glDeleteTextures(GLsizei n, const GLuint * textures) { @@ -4409,16 +4409,10 @@ __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 - XCBConnection *c = XCBConnectionOfDisplay(dpy); - (void) __glXFlushRenderBuffer(gc, gc->pc); - XCBGlxDeleteTextures(c, gc->currentContextTag, n, textures); -#else - GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen); + GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_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; } @@ -4482,7 +4476,7 @@ __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclam emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(textures), (n * 4)); - (void) memcpy((void *)(gc->pc + 8), (void *)(priorities), (n * 4)); + (void) memcpy((void *)(gc->pc + 8 + (n * 4)), (void *)(priorities), (n * 4)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -6443,13 +6437,13 @@ void __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16 + __GLX_PAD((len * 1)); + const GLuint cmdlen = 16 + __GLX_PAD(len); if (__builtin_expect(len >= 0, 1)) { emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4); (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(program), (len * 1)); + (void) memcpy((void *)(gc->pc + 16), (void *)(program), len); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -6462,12 +6456,12 @@ __indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdou __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 44; emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8); + (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8); + (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8); + (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -6479,9 +6473,9 @@ __indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 44; emit_header(gc->pc, X_GLrop_ProgramParameter4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(params), 32); - (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -6522,13 +6516,13 @@ void __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16 + __GLX_PAD(((num * 4) * 8)); + const GLuint cmdlen = 16 + __GLX_PAD((num * 32)); if (__builtin_expect(num >= 0, 1)) { emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(params), ((num * 4) * 8)); + (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 32)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -6539,13 +6533,13 @@ void __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16 + __GLX_PAD(((num * 4) * 4)); + const GLuint cmdlen = 16 + __GLX_PAD((num * 16)); if (__builtin_expect(num >= 0, 1)) { emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(params), ((num * 4) * 4)); + (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 16)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -6993,12 +6987,12 @@ void __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD(((n * 2) * 8)); + const GLuint cmdlen = 12 + __GLX_PAD((n * 16)); if (__builtin_expect(n >= 0, 1)) { emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 2) * 8)); + (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7009,12 +7003,12 @@ void __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD(((n * 2) * 4)); + const GLuint cmdlen = 12 + __GLX_PAD((n * 8)); if (__builtin_expect(n >= 0, 1)) { emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 2) * 4)); + (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7025,12 +7019,12 @@ void __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD(((n * 2) * 2)); + const GLuint cmdlen = 12 + __GLX_PAD((n * 4)); if (__builtin_expect(n >= 0, 1)) { emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 2) * 2)); + (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7041,12 +7035,12 @@ void __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD(((n * 3) * 8)); + const GLuint cmdlen = 12 + __GLX_PAD((n * 24)); if (__builtin_expect(n >= 0, 1)) { emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 3) * 8)); + (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 24)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7057,12 +7051,12 @@ void __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD(((n * 3) * 4)); + const GLuint cmdlen = 12 + __GLX_PAD((n * 12)); if (__builtin_expect(n >= 0, 1)) { emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 3) * 4)); + (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 12)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7073,12 +7067,12 @@ void __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD(((n * 3) * 2)); + const GLuint cmdlen = 12 + __GLX_PAD((n * 6)); if (__builtin_expect(n >= 0, 1)) { emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 3) * 2)); + (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 6)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7089,12 +7083,12 @@ void __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 8)); + const GLuint cmdlen = 12 + __GLX_PAD((n * 32)); if (__builtin_expect(n >= 0, 1)) { emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 8)); + (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 32)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7105,12 +7099,12 @@ void __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 4)); + const GLuint cmdlen = 12 + __GLX_PAD((n * 16)); if (__builtin_expect(n >= 0, 1)) { emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 4)); + (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7121,12 +7115,12 @@ void __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 2)); + const GLuint cmdlen = 12 + __GLX_PAD((n * 8)); if (__builtin_expect(n >= 0, 1)) { emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 2)); + (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7137,12 +7131,12 @@ void __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 1)); + const GLuint cmdlen = 12 + __GLX_PAD((n * 4)); if (__builtin_expect(n >= 0, 1)) { emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); - (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 1)); + (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4)); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7322,7 +7316,7 @@ void __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 16 + __GLX_PAD((len * 1)); + const GLuint cmdlen = 16 + __GLX_PAD(len); if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) { if (cmdlen <= gc->maxSmallRenderCommandSize) { if ( (gc->pc + cmdlen) > gc->bufEnd ) { @@ -7332,7 +7326,7 @@ __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const G (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&format), 4); (void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4); - (void) memcpy((void *)(gc->pc + 16), (void *)(string), (len * 1)); + (void) memcpy((void *)(gc->pc + 16), (void *)(string), len); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7345,7 +7339,7 @@ __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const G (void) memcpy((void *)(pc + 8), (void *)(&target), 4); (void) memcpy((void *)(pc + 12), (void *)(&format), 4); (void) memcpy((void *)(pc + 16), (void *)(&len), 4); - __glXSendLargeCommand(gc, pc, 20, string, (len * 1)); + __glXSendLargeCommand(gc, pc, 20, string, len); } } } @@ -7357,12 +7351,12 @@ __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, G __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 44; emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8); + (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8); + (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8); + (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7374,9 +7368,9 @@ __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdoub __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 44; emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(params), 32); - (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7419,12 +7413,12 @@ __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 44; emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8); + (void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8); + (void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8); + (void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7436,9 +7430,9 @@ __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdo __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 44; emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(params), 32); - (void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4); - (void) memcpy((void *)(gc->pc + 40), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(params), 32); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7513,7 +7507,7 @@ void __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28 + __GLX_PAD((len * 1)); + const GLuint cmdlen = 28 + __GLX_PAD(len); if (__builtin_expect(len >= 0, 1)) { emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4); @@ -7522,7 +7516,7 @@ __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * n (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4); (void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4); - (void) memcpy((void *)(gc->pc + 28), (void *)(name), (len * 1)); + (void) memcpy((void *)(gc->pc + 28), (void *)(name), len); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7533,7 +7527,7 @@ void __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44 + __GLX_PAD((len * 1)); + const GLuint cmdlen = 44 + __GLX_PAD(len); if (__builtin_expect(len >= 0, 1)) { emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); @@ -7542,7 +7536,7 @@ __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * n (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4); (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4); - (void) memcpy((void *)(gc->pc + 44), (void *)(name), (len * 1)); + (void) memcpy((void *)(gc->pc + 44), (void *)(name), len); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7553,13 +7547,13 @@ void __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 28 + __GLX_PAD((len * 1)); + const GLuint cmdlen = 28 + __GLX_PAD(len); if (__builtin_expect(len >= 0, 1)) { emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4); (void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4); (void) memcpy((void *)(gc->pc + 12), (void *)(v), 16); - (void) memcpy((void *)(gc->pc + 28), (void *)(name), (len * 1)); + (void) memcpy((void *)(gc->pc + 28), (void *)(name), len); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7570,13 +7564,13 @@ void __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = 44 + __GLX_PAD((len * 1)); + const GLuint cmdlen = 44 + __GLX_PAD(len); if (__builtin_expect(len >= 0, 1)) { emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen); (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32); (void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4); (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4); - (void) memcpy((void *)(gc->pc + 44), (void *)(name), (len * 1)); + (void) memcpy((void *)(gc->pc + 44), (void *)(name), len); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7588,12 +7582,12 @@ __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte { __GLXcontext * const gc = __glXGetCurrentContext(); Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8 + __GLX_PAD((len * 1)); + const GLuint cmdlen = 8 + __GLX_PAD(len); if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) { GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterfvNV, cmdlen); (void) memcpy((void *)(pc + 0), (void *)(&id), 4); (void) memcpy((void *)(pc + 4), (void *)(&len), 4); - (void) memcpy((void *)(pc + 8), (void *)(name), (len * 1)); + (void) memcpy((void *)(pc + 8), (void *)(name), len); (void) __glXReadReply(dpy, 4, params, GL_TRUE); UnlockDisplay(dpy); SyncHandle(); } @@ -7606,12 +7600,12 @@ __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte { __GLXcontext * const gc = __glXGetCurrentContext(); Display * const dpy = gc->currentDpy; - const GLuint cmdlen = 8 + __GLX_PAD((len * 1)); + const GLuint cmdlen = 8 + __GLX_PAD(len); if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) { GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterdvNV, cmdlen); (void) memcpy((void *)(pc + 0), (void *)(&id), 4); (void) memcpy((void *)(pc + 4), (void *)(&len), 4); - (void) memcpy((void *)(pc + 8), (void *)(name), (len * 1)); + (void) memcpy((void *)(pc + 8), (void *)(name), len); (void) __glXReadReply(dpy, 8, params, GL_TRUE); UnlockDisplay(dpy); SyncHandle(); } @@ -7630,6 +7624,9 @@ __indirect_glGenQueriesARB(GLsizei n, GLuint * ids) XCBConnection *c = XCBConnectionOfDisplay(dpy); (void) __glXFlushRenderBuffer(gc, gc->pc); XCBGlxGenQueriesARBRep *reply = XCBGlxGenQueriesARBReply(c, XCBGlxGenQueriesARB(c, gc->currentContextTag, n), NULL); + if (XCBGlxGenQueriesARBDataLength(reply) == 0) + (void)memcpy(ids, &reply->datum, sizeof(reply->datum)); + else (void)memcpy(ids, XCBGlxGenQueriesARBData(reply), XCBGlxGenQueriesARBDataLength(reply) * sizeof(GLuint)); free(reply); #else @@ -7856,8 +7853,8 @@ __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x) __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 16; emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7869,8 +7866,8 @@ __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v) __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 16; emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7934,9 +7931,9 @@ __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y) __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 24; emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); + (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -7948,8 +7945,8 @@ __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v) __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 24; emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 16); - (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -8015,10 +8012,10 @@ __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z) __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 32; emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); + (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); + (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -8030,8 +8027,8 @@ __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v) __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 32; emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 24); - (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 24); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -8099,11 +8096,11 @@ __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 40; emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); - (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); - (void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); - (void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); - (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); + (void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); + (void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8); + (void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -8115,8 +8112,8 @@ __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v) __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 40; emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32); - (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 32); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } @@ -8208,3 +8205,271 @@ __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v) if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } +#define X_GLvop_IsRenderbufferEXT 1422 +GLboolean +__indirect_glIsRenderbufferEXT(GLuint renderbuffer) +{ + __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_IsRenderbufferEXT, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&renderbuffer), 4); + retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return retval; +} + +#define X_GLrop_BindRenderbufferEXT 4316 +void +__indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_DeleteRenderbuffersEXT 4317 +void +__indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); + if (__builtin_expect(n >= 0, 1)) { + emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(renderbuffers), (n * 4)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLvop_GenRenderbuffersEXT 1423 +void +__indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers) +{ + __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_GenRenderbuffersEXT, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&n), 4); + (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLrop_RenderbufferStorageEXT 4318 +void +__indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 20; + emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLvop_GetRenderbufferParameterivEXT 1424 +void +__indirect_glGetRenderbufferParameterivEXT(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_GetRenderbufferParameterivEXT, 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_IsFramebufferEXT 1425 +GLboolean +__indirect_glIsFramebufferEXT(GLuint framebuffer) +{ + __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_IsFramebufferEXT, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&framebuffer), 4); + retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return retval; +} + +#define X_GLrop_BindFramebufferEXT 4319 +void +__indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_DeleteFramebuffersEXT 4320 +void +__indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); + if (__builtin_expect(n >= 0, 1)) { + emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(framebuffers), (n * 4)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLvop_GenFramebuffersEXT 1426 +void +__indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers) +{ + __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_GenFramebuffersEXT, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&n), 4); + (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLvop_CheckFramebufferStatusEXT 1427 +GLenum +__indirect_glCheckFramebufferStatusEXT(GLenum target) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + Display * const dpy = gc->currentDpy; + GLenum retval = (GLenum) 0; + const GLuint cmdlen = 4; + if (__builtin_expect(dpy != NULL, 1)) { + GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_CheckFramebufferStatusEXT, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&target), 4); + retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return retval; +} + +#define X_GLrop_FramebufferTexture1DEXT 4321 +void +__indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4); + (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_FramebufferTexture2DEXT 4322 +void +__indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4); + (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_FramebufferTexture3DEXT 4323 +void +__indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 28; + emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4); + (void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4); + (void) memcpy((void *)(gc->pc + 24), (void *)(&zoffset), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_FramebufferRenderbufferEXT 4324 +void +__indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 20; + emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&renderbuffertarget), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&renderbuffer), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428 +void +__indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + Display * const dpy = gc->currentDpy; + const GLuint cmdlen = 12; + if (__builtin_expect(dpy != NULL, 1)) { + GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetFramebufferAttachmentParameterivEXT, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&target), 4); + (void) memcpy((void *)(pc + 4), (void *)(&attachment), 4); + (void) memcpy((void *)(pc + 8), (void *)(&pname), 4); + (void) __glXReadReply(dpy, 4, params, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLrop_GenerateMipmapEXT 4325 +void +__indirect_glGenerateMipmapEXT(GLenum target) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 8; + emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, 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); } +} + + +# undef FASTCALL +# undef NOINLINE |