diff options
author | Ian Romanick <[email protected]> | 2005-03-17 01:48:11 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2005-03-17 01:48:11 +0000 |
commit | 3f35fbbf668dab4c1a572f77a0912f4b7c8d857c (patch) | |
tree | a6332fc01602a1406263ad14fba0df31dcd3e3e4 /src/glx/x11 | |
parent | 9eae0b9f19f3e71dec6d6440db69dd5d140228de (diff) |
Fix the handling of zero-sized output parameters (i.e., those with type
'GLvoid *'). This fixes the GLX protocol for glGetProgramStringARB. This
fixes bugzilla #2747.
Remove the 'ignore="true"' from glVertexAttrib4bvARB. This fixes bugzilla
#2746.
Diffstat (limited to 'src/glx/x11')
-rw-r--r-- | src/glx/x11/indirect.c | 15 | ||||
-rw-r--r-- | src/glx/x11/indirect.h | 1 | ||||
-rw-r--r-- | src/glx/x11/indirect_init.c | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c index 4d564c12d54..aafc7ab5896 100644 --- a/src/glx/x11/indirect.c +++ b/src/glx/x11/indirect.c @@ -6756,6 +6756,19 @@ __indirect_glActiveStencilFaceEXT(GLenum face) if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } +#define X_GLrop_VertexAttrib4bvARB 4230 +void +__indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + #define X_GLrop_VertexAttrib4ivARB 4231 void __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v) @@ -7058,7 +7071,7 @@ __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string) GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringARB, cmdlen); (void) memcpy((void *)(pc + 0), (void *)(&target), 4); (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); - (void) __glXReadReply(dpy, 0, string, GL_TRUE); + (void) __glXReadReply(dpy, 1, string, GL_TRUE); UnlockDisplay(dpy); SyncHandle(); } return; diff --git a/src/glx/x11/indirect.h b/src/glx/x11/indirect.h index b704ba846ce..b2efad5a270 100644 --- a/src/glx/x11/indirect.h +++ b/src/glx/x11/indirect.h @@ -611,6 +611,7 @@ extern HIDDEN void __indirect_glPointParameterivNV(GLenum pname, const GLint * p extern HIDDEN void __indirect_glMultiDrawArraysEXT(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); extern HIDDEN void __indirect_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); extern HIDDEN void __indirect_glActiveStencilFaceEXT(GLenum face); +extern HIDDEN void __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v); extern HIDDEN void __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v); extern HIDDEN void __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v); extern HIDDEN void __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v); diff --git a/src/glx/x11/indirect_init.c b/src/glx/x11/indirect_init.c index 70e9dab15f1..64aefcbaf15 100644 --- a/src/glx/x11/indirect_init.c +++ b/src/glx/x11/indirect_init.c @@ -688,6 +688,7 @@ __GLapi * __glXNewIndirectAPI( void ) /* GL_ARB_vertex_program */ + glAPI->VertexAttrib4bvARB = __indirect_glVertexAttrib4bvARB; glAPI->VertexAttrib4ivARB = __indirect_glVertexAttrib4ivARB; glAPI->VertexAttrib4ubvARB = __indirect_glVertexAttrib4ubvARB; glAPI->VertexAttrib4usvARB = __indirect_glVertexAttrib4usvARB; |