diff options
author | Ian Romanick <[email protected]> | 2005-03-11 20:55:03 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2005-03-11 20:55:03 +0000 |
commit | 91c219d9063bf7d3a181ee0b289c68b4a68f3db6 (patch) | |
tree | ec86f53a392a0298087c58defd6441c57159130a /src/glx/x11/indirect.c | |
parent | 522ea4271804b75d90f9bc72b81bfd025bb137d0 (diff) |
Add support for ARB_draw_buffers and ARB_occlusion_query. The GLX protocol
for these extensions (as well as ARB_vertex_program and ARB_matrix_palette)
was just approved by the ARB on 8-Mar-2005. Now the only extension missing
for 1.5 support is ARB_vertex_buffer_object.
The opcodes for ARB_matrix_palette were also added to gl_API.xml. Since
this extension isn't supported by Mesa, no code is generated for it. Some
tabs were also converted to spaces in the comment for
GetCompressedTexImageARB.
Diffstat (limited to 'src/glx/x11/indirect.c')
-rw-r--r-- | src/glx/x11/indirect.c | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c index c654c939395..4d564c12d54 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) |