From: Ian Romanick Date: Fri, 25 Feb 2005 22:46:30 +0000 (+0000) Subject: Add GLX protocol support for ARB_fragement_program, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40af76bbaa9e8909d63d8eeab4689ed2dfe1e19c;p=mesa.git Add GLX protocol support for ARB_fragement_program, ARB_fragment_program_shadow, ARB_vertex_program, NV_fragment_program, NV_fragment_program_option, NV_fragment_program2, NV_vertex_program, NV_vertex_program1_1, NV_vertex_program2, NV_vertex_program2_option, NV_vertex_program3, and ATI_text_fragment_shader. --- diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile index bf629ed8ba3..dbd1f13422e 100644 --- a/src/glx/x11/Makefile +++ b/src/glx/x11/Makefile @@ -33,6 +33,7 @@ C_SOURCES = \ indirect_window_pos.c \ indirect_transpose_matrix.c \ indirect_vertex_array.c \ + indirect_vertex_program.c \ pixel.c \ pixelstore.c \ render2.c \ diff --git a/src/glx/x11/glxextensions.c b/src/glx/x11/glxextensions.c index f4e07efeb07..166dd18c041 100644 --- a/src/glx/x11/glxextensions.c +++ b/src/glx/x11/glxextensions.c @@ -112,7 +112,8 @@ static const struct extension_info known_glx_extensions[] = { static const struct extension_info known_gl_extensions[] = { { GL(ARB_depth_texture), VER(1,4), Y, N, N, N }, - { GL(ARB_fragment_program), VER(0,0), N, N, N, N }, + { GL(ARB_fragment_program), VER(0,0), Y, N, N, N }, + { GL(ARB_fragment_program_shadow), VER(0,0), Y, N, N, N }, { GL(ARB_imaging), VER(0,0), Y, N, N, N }, { GL(ARB_multisample), VER(1,3), Y, N, N, N }, { GL(ARB_multitexture), VER(1,3), Y, N, N, N }, @@ -133,6 +134,7 @@ static const struct extension_info known_gl_extensions[] = { { GL(ARB_texture_rectangle), VER(0,0), Y, N, N, N }, { GL(ARB_transpose_matrix), VER(1,3), Y, N, Y, N }, { GL(ARB_vertex_buffer_object), VER(1,5), N, N, N, N }, + { GL(ARB_vertex_program), VER(0,0), Y, N, N, N }, { GL(ARB_window_pos), VER(1,4), Y, N, N, N }, { GL(EXT_abgr), VER(0,0), Y, N, N, N }, { GL(EXT_bgra), VER(1,2), Y, N, N, N }, @@ -182,6 +184,7 @@ static const struct extension_info known_gl_extensions[] = { { GL(3DFX_texture_compression_FXT1), VER(0,0), Y, N, N, N }, { GL(APPLE_packed_pixels), VER(1,2), Y, N, N, N }, { GL(APPLE_ycbcr_422), VER(0,0), Y, N, N, N }, + { GL(ATI_text_fragment_shader), VER(0,0), Y, N, N, N }, { GL(ATI_texture_env_combine3), VER(0,0), Y, N, N, N }, { GL(ATI_texture_float), VER(0,0), Y, N, N, N }, { GL(ATI_texture_mirror_once), VER(0,0), Y, N, N, N }, @@ -201,6 +204,9 @@ static const struct extension_info known_gl_extensions[] = { { GL(NV_copy_depth_to_color), VER(0,0), Y, N, N, N }, { GL(NV_depth_clamp), VER(0,0), Y, N, N, N }, { GL(NV_fog_distance), VER(0,0), Y, N, N, N }, + { GL(NV_fragment_program), VER(0,0), Y, N, N, N }, + { GL(NV_fragment_program_option), VER(0,0), Y, N, N, N }, + { GL(NV_fragment_program2), VER(0,0), Y, N, N, N }, { GL(NV_light_max_exponent), VER(0,0), Y, N, N, N }, { GL(NV_multisample_filter_hint), VER(0,0), Y, N, N, N }, { GL(NV_point_sprite), VER(0,0), Y, N, N, N }, @@ -208,6 +214,11 @@ static const struct extension_info known_gl_extensions[] = { { GL(NV_texture_compression_vtc), VER(0,0), Y, N, N, N }, { GL(NV_texture_env_combine4), VER(0,0), Y, N, N, N }, { GL(NV_texture_rectangle), VER(0,0), Y, N, N, N }, + { GL(NV_vertex_program), VER(0,0), Y, N, N, N }, + { GL(NV_vertex_program1_1), VER(0,0), Y, N, N, N }, + { GL(NV_vertex_program2), VER(0,0), Y, N, N, N }, + { GL(NV_vertex_program2_option), VER(0,0), Y, N, N, N }, + { GL(NV_vertex_program3), VER(0,0), Y, N, N, N }, { GL(OES_read_format), VER(0,0), Y, N, N, N }, { GL(OES_compressed_paletted_texture),VER(0,0), Y, N, N, N }, { GL(SGI_color_matrix), VER(0,0), Y, N, N, N }, diff --git a/src/glx/x11/glxextensions.h b/src/glx/x11/glxextensions.h index c64561b5c8e..e374161168a 100644 --- a/src/glx/x11/glxextensions.h +++ b/src/glx/x11/glxextensions.h @@ -75,6 +75,7 @@ enum { enum { GL_ARB_depth_texture_bit = 0, GL_ARB_fragment_program_bit, + GL_ARB_fragment_program_shadow_bit, GL_ARB_imaging_bit, GL_ARB_multisample_bit, GL_ARB_multitexture_bit, @@ -142,6 +143,7 @@ enum { GL_3DFX_texture_compression_FXT1_bit, GL_APPLE_packed_pixels_bit, GL_APPLE_ycbcr_422_bit, + GL_ATI_text_fragment_shader_bit, GL_ATI_texture_env_combine3_bit, GL_ATI_texture_float_bit, GL_ATI_texture_mirror_once_bit, @@ -158,12 +160,20 @@ enum { GL_NV_copy_depth_to_color_bit, GL_NV_depth_clamp_bit, GL_NV_fog_distance_bit, + GL_NV_fragment_program_bit, + GL_NV_fragment_program_option_bit, + GL_NV_fragment_program2_bit, GL_NV_light_max_exponent_bit, GL_NV_multisample_filter_hint_bit, GL_NV_point_sprite_bit, GL_NV_texgen_reflection_bit, GL_NV_texture_compression_vtc_bit, GL_NV_texture_env_combine4_bit, + GL_NV_vertex_program_bit, + GL_NV_vertex_program1_1_bit, + GL_NV_vertex_program2_bit, + GL_NV_vertex_program2_option_bit, + GL_NV_vertex_program3_bit, GL_OES_compressed_paletted_texture_bit, GL_OES_read_format_bit, GL_SGI_color_matrix_bit, diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c index a92722a1043..33fc9f9a3c7 100644 --- a/src/glx/x11/indirect.c +++ b/src/glx/x11/indirect.c @@ -5796,41 +5796,1739 @@ __indirect_glSecondaryColor3usvEXT(const GLushort * v) generic_6_byte( X_GLrop_SecondaryColor3usvEXT, v ); } -#define X_GLrop_PointParameteriNV 4221 +#define X_GLvop_AreProgramsResidentNV 1293 +GLboolean +__indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, 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_AreProgramsResidentNV, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&n), 4); + (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4)); + retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return retval; +} + +#define X_GLrop_BindProgramNV 4180 void -__indirect_glPointParameteriNV(GLenum pname, GLint params) +__indirect_glBindProgramNV(GLenum target, GLuint id) { __GLXcontext * const gc = __glXGetCurrentContext(); const GLuint cmdlen = 12; - emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(¶ms), 4); + emit_header(gc->pc, X_GLrop_BindProgramNV, 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_PointParameterivNV 4222 +#define X_GLvop_DeleteProgramsNV 1294 void -__indirect_glPointParameterivNV(GLenum pname, const GLint * params) +__indirect_glDeleteProgramsNV(GLsizei n, const GLuint * ids) { __GLXcontext * const gc = __glXGetCurrentContext(); - const GLuint compsize = __glPointParameterivNV_size(pname); - const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); - emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); - (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); + 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_DeleteProgramsNV, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&n), 4); + (void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4)); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLrop_ExecuteProgramNV 4181 +void +__indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 28; + emit_header(gc->pc, X_GLrop_ExecuteProgramNV, 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 *)(params), 16); gc->pc += cmdlen; if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } } -#define X_GLrop_ActiveStencilFaceEXT 4220 +#define X_GLvop_GenProgramsNV 1295 void -__indirect_glActiveStencilFaceEXT(GLenum face) +__indirect_glGenProgramsNV(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 = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenProgramsNV, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&n), 4); + (void) __glXReadReply(dpy, 4, ids, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLvop_GetProgramParameterdvNV 1297 +void +__indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * 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_GetProgramParameterdvNV, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&target), 4); + (void) memcpy((void *)(pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(pc + 8), (void *)(&pname), 4); + (void) __glXReadReply(dpy, 8, params, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLvop_GetProgramParameterfvNV 1296 +void +__indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * 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_GetProgramParameterfvNV, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&target), 4); + (void) memcpy((void *)(pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(pc + 8), (void *)(&pname), 4); + (void) __glXReadReply(dpy, 4, params, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLvop_GetProgramivNV 1298 +void +__indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params) { __GLXcontext * const gc = __glXGetCurrentContext(); + Display * const dpy = gc->currentDpy; const GLuint cmdlen = 8; - emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen); - (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); + if (__builtin_expect(dpy != NULL, 1)) { + GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivNV, 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_GetProgramStringNV 1299 +void +__indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program) +{ + __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_GetProgramStringNV, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&id), 4); + (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); + (void) __glXReadReply(dpy, 1, program, GL_TRUE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLvop_GetTrackMatrixivNV 1300 +void +__indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, 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_GetTrackMatrixivNV, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&target), 4); + (void) memcpy((void *)(pc + 4), (void *)(&address), 4); + (void) memcpy((void *)(pc + 8), (void *)(&pname), 4); + (void) __glXReadReply(dpy, 4, params, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLvop_IsProgramNV 1304 +GLboolean +__indirect_glIsProgramNV(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 = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsProgramNV, 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_LoadProgramNV 4183 +void +__indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16 + __GLX_PAD((len * 1)); + 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)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLrop_ProgramParameter4dvNV 4185 +void +__indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + __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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramParameter4dvNV 4185 +void +__indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * params) +{ + __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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramParameter4fvNV 4184 +void +__indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 28; + emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, 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 *)(&x), 4); + (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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramParameter4fvNV 4184 +void +__indirect_glProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat * params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 28; + emit_header(gc->pc, X_GLrop_ProgramParameter4fvNV, 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 *)(params), 16); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramParameters4dvNV 4187 +void +__indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(params), 8); + (void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 20), (void *)(&num), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramParameters4fvNV 4186 +void +__indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16 + __GLX_PAD((num * 4)); + 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)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLrop_RequestResidentProgramsNV 4182 +void +__indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); + if (__builtin_expect(n >= 0, 1)) { + emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(ids), (n * 4)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLrop_TrackMatrixNV 4188 +void +__indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 20; + emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&address), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&matrix), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&transform), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib1dvARB 4197 +void +__indirect_glVertexAttrib1dARB(GLuint index, GLdouble x) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); + (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib1dvARB 4197 +void +__indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8); + (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib1fvARB 4193 +void +__indirect_glVertexAttrib1fARB(GLuint index, GLfloat x) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib1fvARB 4193 +void +__indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, 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_VertexAttrib1svARB 4189 +void +__indirect_glVertexAttrib1sARB(GLuint index, GLshort x) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib1svARB 4189 +void +__indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib2dvARB 4198 +void +__indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, 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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib2dvARB 4198 +void +__indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(v), 16); + (void) memcpy((void *)(gc->pc + 20), (void *)(&index), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib2fvARB 4194 +void +__indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib2fvARB 4194 +void +__indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib2svARB 4190 +void +__indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); + (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib2svARB 4190 +void +__indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, 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_VertexAttrib3dvARB 4199 +void +__indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 32; + emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, 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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib3dvARB 4199 +void +__indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 32; + emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(v), 24); + (void) memcpy((void *)(gc->pc + 28), (void *)(&index), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib3fvARB 4195 +void +__indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 20; + emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib3fvARB 4195 +void +__indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 20; + emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib3svARB 4191 +void +__indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); + (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); + (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib3svARB 4191 +void +__indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4dvARB 4200 +void +__indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 40; + emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, 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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4dvARB 4200 +void +__indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 40; + emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(v), 32); + (void) memcpy((void *)(gc->pc + 36), (void *)(&index), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4fvARB 4196 +void +__indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); + (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4fvARB 4196 +void +__indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib4svARB 4192 +void +__indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); + (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); + (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); + (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4svARB 4192 +void +__indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib4NubvARB 4201 +void +__indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1); + (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1); + (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1); + (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4NubvARB 4201 +void +__indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, 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_VertexAttribs1dvNV 4210 +void +__indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12 + __GLX_PAD((n * 8)); + if (__builtin_expect(n >= 0, 1)) { + emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, 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 * 8)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLrop_VertexAttribs1fvNV 4206 +void +__indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12 + __GLX_PAD((n * 4)); + if (__builtin_expect(n >= 0, 1)) { + emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, 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)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLrop_VertexAttribs1svNV 4202 +void +__indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12 + __GLX_PAD((n * 2)); + if (__builtin_expect(n >= 0, 1)) { + emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, 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)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLrop_VertexAttribs2dvNV 4211 +void +__indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 20; + emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8); + (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&n), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttribs2fvNV 4207 +void +__indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + 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), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttribs2svNV 4203 +void +__indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + 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), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttribs3dvNV 4212 +void +__indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 20; + emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8); + (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&n), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttribs3fvNV 4208 +void +__indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + 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), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttribs3svNV 4204 +void +__indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + 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), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttribs4dvNV 4213 +void +__indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 20; + emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8); + (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&n), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttribs4fvNV 4209 +void +__indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + 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), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttribs4svNV 4205 +void +__indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + 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), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttribs4ubvNV 4214 +void +__indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + 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), 1); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_PointParameteriNV 4221 +void +__indirect_glPointParameteriNV(GLenum pname, GLint params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(¶ms), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_PointParameterivNV 4222 +void +__indirect_glPointParameterivNV(GLenum pname, const GLint * params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint compsize = __glPointParameterivNV_size(pname); + const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); + emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ActiveStencilFaceEXT 4220 +void +__indirect_glActiveStencilFaceEXT(GLenum face) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 8; + emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&face), 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) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib4ubvARB 4232 +void +__indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, 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_VertexAttrib4usvARB 4233 +void +__indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib4uivARB 4234 +void +__indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib4NbvARB 4235 +void +__indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, 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_VertexAttrib4NsvARB 4236 +void +__indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib4NivARB 4237 +void +__indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib4NusvARB 4238 +void +__indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib4NuivARB 4239 +void +__indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen); + (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); } +} + +#define X_GLrop_ProgramStringARB 4217 +void +__indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16 + __GLX_PAD((len * 1)); + if (__builtin_expect((len >= 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_ProgramStringARB, cmdlen); + (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)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } + else { + const GLint op = X_GLrop_ProgramStringARB; + 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 *)(&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)); + } + } +} + +#define X_GLrop_ProgramEnvParameter4dvARB 4185 +void +__indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + __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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramEnvParameter4dvARB 4185 +void +__indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params) +{ + __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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramEnvParameter4fvARB 4184 +void +__indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 28; + emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, 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 *)(&x), 4); + (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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramEnvParameter4fvARB 4184 +void +__indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 28; + emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, 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 *)(params), 16); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramLocalParameter4dvARB 4216 +void +__indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + __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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramLocalParameter4dvARB 4216 +void +__indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params) +{ + __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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramLocalParameter4fvARB 4215 +void +__indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 28; + emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, 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 *)(&x), 4); + (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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_ProgramLocalParameter4fvARB 4215 +void +__indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 28; + emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, 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 *)(params), 16); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLvop_GetProgramivARB 1307 +void +__indirect_glGetProgramivARB(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_GetProgramivARB, 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_GetProgramStringARB 1308 +void +__indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string) +{ + __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_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); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLrop_ProgramNamedParameter4fvNV 4218 +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)); + 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 *)(&x), 4); + (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)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLrop_ProgramNamedParameter4dvNV 4219 +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)); + if (__builtin_expect(len >= 0, 1)) { + emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, 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 *)(&id), 4); + (void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4); + (void) memcpy((void *)(gc->pc + 44), (void *)(name), (len * 1)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLrop_ProgramNamedParameter4fvNV 4218 +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)); + 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)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLrop_ProgramNamedParameter4dvNV 4219 +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)); + 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)); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } + } +} + +#define X_GLvop_GetProgramNamedParameterfvNV 1310 +void +__indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + Display * const dpy = gc->currentDpy; + const GLuint cmdlen = 8 + __GLX_PAD((len * 1)); + 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) __glXReadReply(dpy, 4, params, GL_TRUE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLvop_GetProgramNamedParameterdvNV 1311 +void +__indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + Display * const dpy = gc->currentDpy; + const GLuint cmdlen = 8 + __GLX_PAD((len * 1)); + 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) __glXReadReply(dpy, 8, params, GL_TRUE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLvop_GetVertexAttribdvNV 1301 +void +__indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * 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_GetVertexAttribdvNV, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&index), 4); + (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); + (void) __glXReadReply(dpy, 8, params, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLvop_GetVertexAttribfvNV 1302 +void +__indirect_glGetVertexAttribfvNV(GLuint index, 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_GetVertexAttribfvNV, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&index), 4); + (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); + (void) __glXReadReply(dpy, 4, params, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLvop_GetVertexAttribivNV 1303 +void +__indirect_glGetVertexAttribivNV(GLuint index, 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_GetVertexAttribivNV, cmdlen); + (void) memcpy((void *)(pc + 0), (void *)(&index), 4); + (void) memcpy((void *)(pc + 4), (void *)(&pname), 4); + (void) __glXReadReply(dpy, 4, params, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + +#define X_GLrop_VertexAttrib1dvNV 4197 +void +__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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib1dvNV 4197 +void +__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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib1fvNV 4193 +void +__indirect_glVertexAttrib1fNV(GLuint index, GLfloat x) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib1fvNV 4193 +void +__indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, 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_VertexAttrib1svNV 4189 +void +__indirect_glVertexAttrib1sNV(GLuint index, GLshort x) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib1svNV 4189 +void +__indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib2dvNV 4198 +void +__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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib2dvNV 4198 +void +__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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib2fvNV 4194 +void +__indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib2fvNV 4194 +void +__indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib2svNV 4190 +void +__indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); + (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib2svNV 4190 +void +__indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, 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_VertexAttrib3dvNV 4199 +void +__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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib3dvNV 4199 +void +__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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib3fvNV 4195 +void +__indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 20; + emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib3fvNV 4195 +void +__indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 20; + emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 12); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib3svNV 4191 +void +__indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); + (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); + (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib3svNV 4191 +void +__indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(v), 6); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4dvNV 4200 +void +__indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + __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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4dvNV 4200 +void +__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); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4fvNV 4196 +void +__indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); + (void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); + (void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); + (void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4fvNV 4196 +void +__indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib4svNV 4192 +void +__indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); + (void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); + (void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); + (void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4svNV 4192 +void +__indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 16; + emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen); + (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); } +} + +#define X_GLrop_VertexAttrib4ubvNV 4201 +void +__indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen); + (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); + (void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1); + (void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1); + (void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1); + (void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } +} + +#define X_GLrop_VertexAttrib4ubvNV 4201 +void +__indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 12; + emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, 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); } } diff --git a/src/glx/x11/indirect.h b/src/glx/x11/indirect.h index 93bab10bf6f..51228465d41 100644 --- a/src/glx/x11/indirect.h +++ b/src/glx/x11/indirect.h @@ -541,11 +541,137 @@ extern HIDDEN void __indirect_glSecondaryColor3uivEXT(const GLuint * v); extern HIDDEN void __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue); extern HIDDEN void __indirect_glSecondaryColor3usvEXT(const GLushort * v); extern HIDDEN void __indirect_glSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +extern HIDDEN GLboolean __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences); +extern HIDDEN void __indirect_glBindProgramNV(GLenum target, GLuint id); +extern HIDDEN void __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * ids); +extern HIDDEN void __indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params); +extern HIDDEN void __indirect_glGenProgramsNV(GLsizei n, GLuint * ids); +extern HIDDEN void __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params); +extern HIDDEN void __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params); +extern HIDDEN void __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params); +extern HIDDEN void __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program); +extern HIDDEN void __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params); +extern HIDDEN void __indirect_glGetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble * params); +extern HIDDEN void __indirect_glGetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat * params); +extern HIDDEN void __indirect_glGetVertexAttribivARB(GLuint index, GLenum pname, GLint * params); +extern HIDDEN void __indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid ** pointer); +extern HIDDEN GLboolean __indirect_glIsProgramNV(GLuint id); +extern HIDDEN void __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program); +extern HIDDEN void __indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +extern HIDDEN void __indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * params); +extern HIDDEN void __indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +extern HIDDEN void __indirect_glProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat * params); +extern HIDDEN void __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params); +extern HIDDEN void __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params); +extern HIDDEN void __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids); +extern HIDDEN void __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform); +extern HIDDEN void __indirect_glVertexAttribPointerNV(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +extern HIDDEN void __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x); +extern HIDDEN void __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x); +extern HIDDEN void __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttrib1sARB(GLuint index, GLshort x); +extern HIDDEN void __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y); +extern HIDDEN void __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y); +extern HIDDEN void __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y); +extern HIDDEN void __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z); +extern HIDDEN void __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z); +extern HIDDEN void __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z); +extern HIDDEN void __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +extern HIDDEN void __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +extern HIDDEN void __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +extern HIDDEN void __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +extern HIDDEN void __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v); +extern HIDDEN void __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v); extern HIDDEN void __indirect_glPointParameteriNV(GLenum pname, GLint params); extern HIDDEN void __indirect_glPointParameterivNV(GLenum pname, const GLint * params); 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_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); +extern HIDDEN void __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v); +extern HIDDEN void __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v); +extern HIDDEN void __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v); +extern HIDDEN void __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v); +extern HIDDEN void __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v); +extern HIDDEN void __indirect_glVertexAttribPointerARB(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); +extern HIDDEN void __indirect_glEnableVertexAttribArrayARB(GLuint index); +extern HIDDEN void __indirect_glDisableVertexAttribArrayARB(GLuint index); +extern HIDDEN void __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string); +extern HIDDEN void __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +extern HIDDEN void __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params); +extern HIDDEN void __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +extern HIDDEN void __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params); +extern HIDDEN void __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +extern HIDDEN void __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params); +extern HIDDEN void __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +extern HIDDEN void __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params); +extern HIDDEN void __indirect_glGetProgramEnvParameterdvARB(GLenum target, GLuint index, GLdouble * params); +extern HIDDEN void __indirect_glGetProgramEnvParameterfvARB(GLenum target, GLuint index, GLfloat * params); +extern HIDDEN void __indirect_glGetProgramLocalParameterdvARB(GLenum target, GLuint index, GLdouble * params); +extern HIDDEN void __indirect_glGetProgramLocalParameterfvARB(GLenum target, GLuint index, GLfloat * params); +extern HIDDEN void __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params); +extern HIDDEN void __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string); +extern HIDDEN void __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +extern HIDDEN void __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +extern HIDDEN void __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); +extern HIDDEN void __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); +extern HIDDEN void __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); +extern HIDDEN void __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); +extern HIDDEN void __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params); +extern HIDDEN void __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params); +extern HIDDEN void __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params); +extern HIDDEN void __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x); +extern HIDDEN void __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x); +extern HIDDEN void __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttrib1sNV(GLuint index, GLshort x); +extern HIDDEN void __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y); +extern HIDDEN void __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y); +extern HIDDEN void __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y); +extern HIDDEN void __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z); +extern HIDDEN void __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z); +extern HIDDEN void __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z); +extern HIDDEN void __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +extern HIDDEN void __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v); +extern HIDDEN void __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +extern HIDDEN void __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v); +extern HIDDEN void __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +extern HIDDEN void __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v); +extern HIDDEN void __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +extern HIDDEN void __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v); # undef HIDDEN # undef FASTCALL diff --git a/src/glx/x11/indirect_init.c b/src/glx/x11/indirect_init.c index a153e1bf05f..5e2fc0437e7 100644 --- a/src/glx/x11/indirect_init.c +++ b/src/glx/x11/indirect_init.c @@ -589,6 +589,85 @@ __GLapi * __glXNewIndirectAPI( void ) glAPI->SecondaryColor3usvEXT = __indirect_glSecondaryColor3usvEXT; glAPI->SecondaryColorPointerEXT = __indirect_glSecondaryColorPointerEXT; + /* GL_NV_vertex_program */ + + glAPI->AreProgramsResidentNV = __indirect_glAreProgramsResidentNV; + glAPI->BindProgramNV = __indirect_glBindProgramNV; + glAPI->DeleteProgramsNV = __indirect_glDeleteProgramsNV; + glAPI->ExecuteProgramNV = __indirect_glExecuteProgramNV; + glAPI->GenProgramsNV = __indirect_glGenProgramsNV; + glAPI->GetProgramParameterdvNV = __indirect_glGetProgramParameterdvNV; + glAPI->GetProgramParameterfvNV = __indirect_glGetProgramParameterfvNV; + glAPI->GetProgramivNV = __indirect_glGetProgramivNV; + glAPI->GetProgramStringNV = __indirect_glGetProgramStringNV; + glAPI->GetTrackMatrixivNV = __indirect_glGetTrackMatrixivNV; + + /* GL_ARB_vertex_program */ + + glAPI->GetVertexAttribdvARB = __indirect_glGetVertexAttribdvARB; + glAPI->GetVertexAttribfvARB = __indirect_glGetVertexAttribfvARB; + glAPI->GetVertexAttribivARB = __indirect_glGetVertexAttribivARB; + + /* GL_NV_vertex_program */ + + glAPI->GetVertexAttribPointervNV = __indirect_glGetVertexAttribPointervNV; + glAPI->IsProgramNV = __indirect_glIsProgramNV; + glAPI->LoadProgramNV = __indirect_glLoadProgramNV; + glAPI->ProgramParameter4dNV = __indirect_glProgramParameter4dNV; + glAPI->ProgramParameter4dvNV = __indirect_glProgramParameter4dvNV; + glAPI->ProgramParameter4fNV = __indirect_glProgramParameter4fNV; + glAPI->ProgramParameter4fvNV = __indirect_glProgramParameter4fvNV; + glAPI->ProgramParameters4dvNV = __indirect_glProgramParameters4dvNV; + glAPI->ProgramParameters4fvNV = __indirect_glProgramParameters4fvNV; + glAPI->RequestResidentProgramsNV = __indirect_glRequestResidentProgramsNV; + glAPI->TrackMatrixNV = __indirect_glTrackMatrixNV; + glAPI->VertexAttribPointerNV = __indirect_glVertexAttribPointerNV; + + /* GL_ARB_vertex_program */ + + glAPI->VertexAttrib1dARB = __indirect_glVertexAttrib1dARB; + glAPI->VertexAttrib1dvARB = __indirect_glVertexAttrib1dvARB; + glAPI->VertexAttrib1fARB = __indirect_glVertexAttrib1fARB; + glAPI->VertexAttrib1fvARB = __indirect_glVertexAttrib1fvARB; + glAPI->VertexAttrib1sARB = __indirect_glVertexAttrib1sARB; + glAPI->VertexAttrib1svARB = __indirect_glVertexAttrib1svARB; + glAPI->VertexAttrib2dARB = __indirect_glVertexAttrib2dARB; + glAPI->VertexAttrib2dvARB = __indirect_glVertexAttrib2dvARB; + glAPI->VertexAttrib2fARB = __indirect_glVertexAttrib2fARB; + glAPI->VertexAttrib2fvARB = __indirect_glVertexAttrib2fvARB; + glAPI->VertexAttrib2sARB = __indirect_glVertexAttrib2sARB; + glAPI->VertexAttrib2svARB = __indirect_glVertexAttrib2svARB; + glAPI->VertexAttrib3dARB = __indirect_glVertexAttrib3dARB; + glAPI->VertexAttrib3dvARB = __indirect_glVertexAttrib3dvARB; + glAPI->VertexAttrib3fARB = __indirect_glVertexAttrib3fARB; + glAPI->VertexAttrib3fvARB = __indirect_glVertexAttrib3fvARB; + glAPI->VertexAttrib3sARB = __indirect_glVertexAttrib3sARB; + glAPI->VertexAttrib3svARB = __indirect_glVertexAttrib3svARB; + glAPI->VertexAttrib4dARB = __indirect_glVertexAttrib4dARB; + glAPI->VertexAttrib4dvARB = __indirect_glVertexAttrib4dvARB; + glAPI->VertexAttrib4fARB = __indirect_glVertexAttrib4fARB; + glAPI->VertexAttrib4fvARB = __indirect_glVertexAttrib4fvARB; + glAPI->VertexAttrib4sARB = __indirect_glVertexAttrib4sARB; + glAPI->VertexAttrib4svARB = __indirect_glVertexAttrib4svARB; + glAPI->VertexAttrib4NubARB = __indirect_glVertexAttrib4NubARB; + glAPI->VertexAttrib4NubvARB = __indirect_glVertexAttrib4NubvARB; + + /* GL_NV_vertex_program */ + + glAPI->VertexAttribs1dvNV = __indirect_glVertexAttribs1dvNV; + glAPI->VertexAttribs1fvNV = __indirect_glVertexAttribs1fvNV; + glAPI->VertexAttribs1svNV = __indirect_glVertexAttribs1svNV; + glAPI->VertexAttribs2dvNV = __indirect_glVertexAttribs2dvNV; + glAPI->VertexAttribs2fvNV = __indirect_glVertexAttribs2fvNV; + glAPI->VertexAttribs2svNV = __indirect_glVertexAttribs2svNV; + glAPI->VertexAttribs3dvNV = __indirect_glVertexAttribs3dvNV; + glAPI->VertexAttribs3fvNV = __indirect_glVertexAttribs3fvNV; + glAPI->VertexAttribs3svNV = __indirect_glVertexAttribs3svNV; + glAPI->VertexAttribs4dvNV = __indirect_glVertexAttribs4dvNV; + glAPI->VertexAttribs4fvNV = __indirect_glVertexAttribs4fvNV; + glAPI->VertexAttribs4svNV = __indirect_glVertexAttribs4svNV; + glAPI->VertexAttribs4ubvNV = __indirect_glVertexAttribs4ubvNV; + /* GL_NV_point_sprite */ glAPI->PointParameteriNV = __indirect_glPointParameteriNV; @@ -603,6 +682,77 @@ __GLapi * __glXNewIndirectAPI( void ) glAPI->ActiveStencilFaceEXT = __indirect_glActiveStencilFaceEXT; + /* GL_ARB_vertex_program */ + + glAPI->VertexAttrib4ivARB = __indirect_glVertexAttrib4ivARB; + glAPI->VertexAttrib4ubvARB = __indirect_glVertexAttrib4ubvARB; + glAPI->VertexAttrib4usvARB = __indirect_glVertexAttrib4usvARB; + glAPI->VertexAttrib4uivARB = __indirect_glVertexAttrib4uivARB; + glAPI->VertexAttrib4NbvARB = __indirect_glVertexAttrib4NbvARB; + glAPI->VertexAttrib4NsvARB = __indirect_glVertexAttrib4NsvARB; + glAPI->VertexAttrib4NivARB = __indirect_glVertexAttrib4NivARB; + glAPI->VertexAttrib4NusvARB = __indirect_glVertexAttrib4NusvARB; + glAPI->VertexAttrib4NuivARB = __indirect_glVertexAttrib4NuivARB; + glAPI->VertexAttribPointerARB = __indirect_glVertexAttribPointerARB; + glAPI->EnableVertexAttribArrayARB = __indirect_glEnableVertexAttribArrayARB; + glAPI->DisableVertexAttribArrayARB = __indirect_glDisableVertexAttribArrayARB; + glAPI->ProgramStringARB = __indirect_glProgramStringARB; + glAPI->ProgramEnvParameter4dARB = __indirect_glProgramEnvParameter4dARB; + glAPI->ProgramEnvParameter4dvARB = __indirect_glProgramEnvParameter4dvARB; + glAPI->ProgramEnvParameter4fARB = __indirect_glProgramEnvParameter4fARB; + glAPI->ProgramEnvParameter4fvARB = __indirect_glProgramEnvParameter4fvARB; + glAPI->ProgramLocalParameter4dARB = __indirect_glProgramLocalParameter4dARB; + glAPI->ProgramLocalParameter4dvARB = __indirect_glProgramLocalParameter4dvARB; + glAPI->ProgramLocalParameter4fARB = __indirect_glProgramLocalParameter4fARB; + glAPI->ProgramLocalParameter4fvARB = __indirect_glProgramLocalParameter4fvARB; + glAPI->GetProgramEnvParameterdvARB = __indirect_glGetProgramEnvParameterdvARB; + glAPI->GetProgramEnvParameterfvARB = __indirect_glGetProgramEnvParameterfvARB; + glAPI->GetProgramLocalParameterdvARB = __indirect_glGetProgramLocalParameterdvARB; + glAPI->GetProgramLocalParameterfvARB = __indirect_glGetProgramLocalParameterfvARB; + glAPI->GetProgramivARB = __indirect_glGetProgramivARB; + glAPI->GetProgramStringARB = __indirect_glGetProgramStringARB; + + /* GL_NV_fragment_program */ + + glAPI->ProgramNamedParameter4fNV = __indirect_glProgramNamedParameter4fNV; + glAPI->ProgramNamedParameter4dNV = __indirect_glProgramNamedParameter4dNV; + glAPI->ProgramNamedParameter4fvNV = __indirect_glProgramNamedParameter4fvNV; + glAPI->ProgramNamedParameter4dvNV = __indirect_glProgramNamedParameter4dvNV; + glAPI->GetProgramNamedParameterfvNV = __indirect_glGetProgramNamedParameterfvNV; + glAPI->GetProgramNamedParameterdvNV = __indirect_glGetProgramNamedParameterdvNV; + + /* GL_NV_vertex_program */ + + glAPI->GetVertexAttribdvNV = __indirect_glGetVertexAttribdvNV; + glAPI->GetVertexAttribfvNV = __indirect_glGetVertexAttribfvNV; + glAPI->GetVertexAttribivNV = __indirect_glGetVertexAttribivNV; + glAPI->VertexAttrib1dNV = __indirect_glVertexAttrib1dNV; + glAPI->VertexAttrib1dvNV = __indirect_glVertexAttrib1dvNV; + glAPI->VertexAttrib1fNV = __indirect_glVertexAttrib1fNV; + glAPI->VertexAttrib1fvNV = __indirect_glVertexAttrib1fvNV; + glAPI->VertexAttrib1sNV = __indirect_glVertexAttrib1sNV; + glAPI->VertexAttrib1svNV = __indirect_glVertexAttrib1svNV; + glAPI->VertexAttrib2dNV = __indirect_glVertexAttrib2dNV; + glAPI->VertexAttrib2dvNV = __indirect_glVertexAttrib2dvNV; + glAPI->VertexAttrib2fNV = __indirect_glVertexAttrib2fNV; + glAPI->VertexAttrib2fvNV = __indirect_glVertexAttrib2fvNV; + glAPI->VertexAttrib2sNV = __indirect_glVertexAttrib2sNV; + glAPI->VertexAttrib2svNV = __indirect_glVertexAttrib2svNV; + glAPI->VertexAttrib3dNV = __indirect_glVertexAttrib3dNV; + glAPI->VertexAttrib3dvNV = __indirect_glVertexAttrib3dvNV; + glAPI->VertexAttrib3fNV = __indirect_glVertexAttrib3fNV; + glAPI->VertexAttrib3fvNV = __indirect_glVertexAttrib3fvNV; + glAPI->VertexAttrib3sNV = __indirect_glVertexAttrib3sNV; + glAPI->VertexAttrib3svNV = __indirect_glVertexAttrib3svNV; + glAPI->VertexAttrib4dNV = __indirect_glVertexAttrib4dNV; + glAPI->VertexAttrib4dvNV = __indirect_glVertexAttrib4dvNV; + glAPI->VertexAttrib4fNV = __indirect_glVertexAttrib4fNV; + glAPI->VertexAttrib4fvNV = __indirect_glVertexAttrib4fvNV; + glAPI->VertexAttrib4sNV = __indirect_glVertexAttrib4sNV; + glAPI->VertexAttrib4svNV = __indirect_glVertexAttrib4svNV; + glAPI->VertexAttrib4ubNV = __indirect_glVertexAttrib4ubNV; + glAPI->VertexAttrib4ubvNV = __indirect_glVertexAttrib4ubvNV; + return glAPI; } diff --git a/src/glx/x11/indirect_vertex_array.c b/src/glx/x11/indirect_vertex_array.c index 8bc7e449021..fece2282098 100644 --- a/src/glx/x11/indirect_vertex_array.c +++ b/src/glx/x11/indirect_vertex_array.c @@ -103,6 +103,12 @@ struct array_state { */ GLint count; + /** + * "Normalized" data is on the range [0,1] (unsigned) or [-1,1] (signed). + * This is used for mapping integral types to floating point types. + */ + GLboolean normalized; + /** * Pre-calculated GLX protocol command header. */ @@ -296,6 +302,14 @@ struct array_state_vector { */ unsigned num_texture_units; + /** + * Number of generic vertex program attribs. If GL_ARB_vertex_program + * is not supported, this will be zero. Otherwise it will be the value + * queries by calling \c glGetProgramiv with \c GL_VERTEX_PROGRAM_ARB + * and \c GL_MAX_PROGRAM_ATTRIBS_ARB. + */ + unsigned num_vertex_program_attribs; + /** * \n Methods for implementing various GL functions. * @@ -337,8 +351,8 @@ static GLubyte * emit_element_old( GLubyte * dst, static struct array_state * get_array_entry( const struct array_state_vector * arrays, GLenum key, unsigned index ); static void fill_array_info_cache( struct array_state_vector * arrays ); -static GLboolean glx_validate_array_args(__GLXcontext *gc, GLenum mode, - GLsizei count); +static GLboolean validate_mode(__GLXcontext *gc, GLenum mode); +static GLboolean validate_count(__GLXcontext *gc, GLsizei count); /** @@ -380,6 +394,8 @@ __glXInitVertexArrayState( __GLXcontext * gc ) unsigned array_count; unsigned texture_units = 1; unsigned i; + unsigned j; + unsigned vertex_program_attribs; GLboolean got_fog = GL_FALSE; GLboolean got_secondary_color = GL_FALSE; @@ -432,8 +448,14 @@ __glXInitVertexArrayState( __GLXcontext * gc ) texture_units = 1; } + if ( __glExtensionBitIsEnabled( gc, GL_ARB_vertex_program_bit ) ) { + glGetProgramivARB( GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ATTRIBS_ARB, + & vertex_program_attribs ); + } + arrays->num_texture_units = texture_units; - array_count += texture_units; + arrays->num_vertex_program_attribs = vertex_program_attribs; + array_count += texture_units + vertex_program_attribs; arrays->num_arrays = array_count; arrays->arrays = malloc( sizeof( struct array_state ) * array_count ); @@ -444,11 +466,13 @@ __glXInitVertexArrayState( __GLXcontext * gc ) arrays->arrays[0].data_type = GL_FLOAT; arrays->arrays[0].count = 3; arrays->arrays[0].key = GL_NORMAL_ARRAY; + arrays->arrays[0].normalized = GL_TRUE; arrays->arrays[0].old_DrawArrays_possible = GL_TRUE; arrays->arrays[1].data_type = GL_FLOAT; arrays->arrays[1].count = 4; arrays->arrays[1].key = GL_COLOR_ARRAY; + arrays->arrays[1].normalized = GL_TRUE; arrays->arrays[1].old_DrawArrays_possible = GL_TRUE; arrays->arrays[2].data_type = GL_FLOAT; @@ -465,7 +489,7 @@ __glXInitVertexArrayState( __GLXcontext * gc ) arrays->arrays[4 + i].data_type = GL_FLOAT; arrays->arrays[4 + i].count = 4; arrays->arrays[4 + i].key = GL_TEXTURE_COORD_ARRAY; - + arrays->arrays[4 + i].old_DrawArrays_possible = (i == 0); arrays->arrays[4 + i].index = i; @@ -487,10 +511,28 @@ __glXInitVertexArrayState( __GLXcontext * gc ) arrays->arrays[i].count = 3; arrays->arrays[i].key = GL_SECONDARY_COLOR_ARRAY; arrays->arrays[i].old_DrawArrays_possible = GL_TRUE; + arrays->arrays[i].normalized = GL_TRUE; i++; } + for ( j = 0 ; j < vertex_program_attribs ; j++ ) { + const unsigned idx = (vertex_program_attribs - (j + 1)); + + + arrays->arrays[idx + i].data_type = GL_FLOAT; + arrays->arrays[idx + i].count = 4; + arrays->arrays[idx + i].key = GL_VERTEX_ATTRIB_ARRAY_POINTER; + + arrays->arrays[idx + i].old_DrawArrays_possible = 0; + arrays->arrays[idx + i].index = idx; + + arrays->arrays[idx + i].header[1] = idx; + } + + i += vertex_program_attribs; + + /* Vertex array *must* be last becuase of the way that * emit_DrawArrays_none works. */ @@ -521,8 +563,7 @@ calculate_single_vertex_size_none( const struct array_state_vector * arrays ) for ( i = 0 ; i < arrays->num_arrays ; i++ ) { if ( arrays->arrays[i].enabled ) { - single_vertex_size += __GLX_PAD(arrays->arrays[i].element_size) - + arrays->arrays[i].header_size; + single_vertex_size += ((uint16_t *)arrays->arrays[i].header)[0]; } } @@ -545,6 +586,15 @@ emit_element_none( GLubyte * dst, if ( arrays->arrays[i].enabled ) { const size_t offset = index * arrays->arrays[i].true_stride; + /* The generic attributes can have more data than is in the + * elements. This is because a vertex array can be a 2 element, + * normalized, unsigned short, but the "closest" immediate mode + * protocol is for a 4Nus. Since the sizes are small, the + * performance impact on modern processors should be negligible. + */ + (void) memset( dst, 0, + ((uint16_t *)arrays->arrays[i].header)[0] ); + (void) memcpy( dst, arrays->arrays[i].header, arrays->arrays[i].header_size ); @@ -1635,6 +1685,139 @@ void __indirect_glFogCoordPointerEXT( GLenum type, GLsizei stride, } +void __indirect_glVertexAttribPointerARB(GLuint index, GLint size, + GLenum type, GLboolean normalized, + GLsizei stride, + const GLvoid * pointer) +{ + static const uint16_t short_ops[5] = { 0, 4189, 4190, 4191, 4192 }; + static const uint16_t float_ops[5] = { 0, 4193, 4194, 4195, 4196 }; + static const uint16_t double_ops[5] = { 0, 4197, 4198, 4199, 4200 }; + + uint16_t opcode; + __GLXcontext *gc = __glXGetCurrentContext(); + __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); + struct array_state_vector * arrays = state->array_state; + struct array_state * a; + unsigned true_immediate_count; + unsigned true_immediate_size; + + + if ( (size < 1) || (size > 4) || (stride < 0) + || (index > arrays->num_vertex_program_attribs) ){ + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + + if ( normalized && (type != GL_FLOAT) && (type != GL_DOUBLE)) { + switch( type ) { + case GL_BYTE: opcode = X_GLrop_VertexAttrib4NbvARB; break; + case GL_UNSIGNED_BYTE: opcode = X_GLrop_VertexAttrib4NubvARB; break; + case GL_SHORT: opcode = X_GLrop_VertexAttrib4NsvARB; break; + case GL_UNSIGNED_SHORT: opcode = X_GLrop_VertexAttrib4NusvARB; break; + case GL_INT: opcode = X_GLrop_VertexAttrib4NivARB; break; + case GL_UNSIGNED_INT: opcode = X_GLrop_VertexAttrib4NuivARB; break; + default: + __glXSetError(gc, GL_INVALID_ENUM); + return; + } + + true_immediate_count = 4; + } + else { + switch( type ) { + case GL_BYTE: + opcode = X_GLrop_VertexAttrib4bvARB; + true_immediate_count = 4; + break; + case GL_UNSIGNED_BYTE: + opcode = X_GLrop_VertexAttrib4ubvARB; + true_immediate_count = 4; + break; + case GL_SHORT: + opcode = short_ops[size]; + break; + case GL_UNSIGNED_SHORT: + opcode = X_GLrop_VertexAttrib4usvARB; + true_immediate_count = 4; + break; + case GL_INT: + opcode = X_GLrop_VertexAttrib4ivARB; + true_immediate_count = 4; + break; + case GL_UNSIGNED_INT: + opcode = X_GLrop_VertexAttrib4uivARB; + true_immediate_count = 4; + break; + case GL_FLOAT: + opcode = float_ops[size]; + break; + case GL_DOUBLE: + opcode = double_ops[size]; + break; + default: + __glXSetError(gc, GL_INVALID_ENUM); + return; + } + } + + a = get_array_entry( arrays, GL_VERTEX_ATTRIB_ARRAY_POINTER, index ); + if ( a == NULL ) { + __glXSetError(gc, GL_INVALID_OPERATION); + return; + } + + COMMON_ARRAY_DATA_INIT( a, pointer, type, stride, size, 8, opcode ); + + true_immediate_size = __glXTypeSize(type) * true_immediate_count; + ((uint16_t *) (a)->header)[0] = __GLX_PAD(a->header_size + + true_immediate_size); + + if ( a->enabled ) { + arrays->array_info_cache_valid = GL_FALSE; + } +} + + +/** + * I don't have 100% confidence that this is correct. The different rules + * about whether or not generic vertex attributes alias "classic" vertex + * attributes (i.e., attrib1 ?= primary color) between ARB_vertex_program, + * ARB_vertex_shader, and NV_vertex_program are a bit confusing. My + * feeling is that the client-side doesn't have to worry about it. The + * client just sends all the data to the server and lets the server deal + * with it. + */ +void __indirect_glVertexAttribPointerNV( GLuint index, GLint size, + GLenum type, GLsizei stride, + const GLvoid * pointer) +{ + __GLXcontext *gc = __glXGetCurrentContext(); + GLboolean normalized = GL_FALSE; + + + switch( type ) { + case GL_UNSIGNED_BYTE: + if ( size != 4 ) { + __glXSetError(gc, GL_INVALID_VALUE); + return; + } + normalized = GL_TRUE; + + case GL_SHORT: + case GL_FLOAT: + case GL_DOUBLE: + __indirect_glVertexAttribPointerARB(index, size, type, + normalized, + stride, pointer); + return; + default: + __glXSetError(gc, GL_INVALID_ENUM); + return; + } +} + + void __indirect_glClientActiveTextureARB(GLenum texture) { __GLXcontext * const gc = __glXGetCurrentContext(); @@ -1776,7 +1959,26 @@ __glXGetArrayPointer( const __GLXattribute * const state, if ( a != NULL ) { - *dest = a->data; + *dest = (void *) (a->data); + } + + return (a != NULL); +} + + +/** + */ +GLboolean +__glXGetArrayNormalized( const __GLXattribute * const state, + GLenum key, unsigned index, GLintptr * dest ) +{ + const struct array_state_vector * arrays = state->array_state; + const struct array_state * a = get_array_entry( (struct array_state_vector *) arrays, + key, index ); + + + if ( a != NULL ) { + *dest = (GLintptr) a->normalized; } return (a != NULL); diff --git a/src/glx/x11/indirect_vertex_array.h b/src/glx/x11/indirect_vertex_array.h index 5eae8a5a6e9..caab62b672e 100644 --- a/src/glx/x11/indirect_vertex_array.h +++ b/src/glx/x11/indirect_vertex_array.h @@ -46,6 +46,8 @@ extern GLboolean __glXGetArrayStride( const __GLXattribute * const state, GLenum key, unsigned index, GLintptr * dest ); extern GLboolean __glXGetArrayPointer( const __GLXattribute * const state, GLenum key, unsigned index, void ** dest ); +extern GLboolean __glXGetArrayNormalized( const __GLXattribute * const state, + GLenum key, unsigned index, GLintptr * dest ); extern void __glXPushArrayState( __GLXattribute * state ); extern void __glXPopArrayState( __GLXattribute * state ); diff --git a/src/glx/x11/indirect_vertex_program.c b/src/glx/x11/indirect_vertex_program.c new file mode 100644 index 00000000000..93fd9a3c45d --- /dev/null +++ b/src/glx/x11/indirect_vertex_program.c @@ -0,0 +1,272 @@ +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include "indirect.h" +#include "glxclient.h" +#include "indirect_vertex_array.h" +#include + +void do_vertex_attrib_enable( GLuint index, GLboolean val ) +{ + __GLXcontext *gc = __glXGetCurrentContext(); + __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); + + if ( ! __glXSetArrayEnable( state, GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB, + index, val ) ) { + __glXSetError(gc, GL_INVALID_ENUM); + } +} + + +void __indirect_glEnableVertexAttribArrayARB( GLuint index ) +{ + do_vertex_attrib_enable( index, GL_TRUE ); +} + + +void __indirect_glDisableVertexAttribArrayARB( GLuint index ) +{ + do_vertex_attrib_enable( index, GL_FALSE ); +} + + +static void +get_parameter( unsigned opcode, unsigned size, GLenum target, GLuint index, + GLfloat * 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, + opcode, cmdlen); + + *((GLenum *)(pc + 0)) = target; + *((GLuint *)(pc + 4)) = index; + *((GLuint *)(pc + 8)) = 0; + + (void) __glXReadReply(dpy, size, params, GL_FALSE); + UnlockDisplay(dpy); SyncHandle(); + } + return; +} + + +void __indirect_glGetProgramEnvParameterfvARB( GLenum target, GLuint index, + GLfloat * params ) +{ + get_parameter( 1296, 4, target, index, params ); +} + + +void __indirect_glGetProgramEnvParameterdvARB( GLenum target, GLuint index, + GLdouble * params ) +{ + get_parameter( 1297, 8, target, index, params ); +} + + +void __indirect_glGetProgramLocalParameterfvARB( GLenum target, GLuint index, + GLfloat * params ) +{ + get_parameter( 1305, 4, target, index, params ); +} + + +void __indirect_glGetProgramLocalParameterdvARB( GLenum target, GLuint index, + GLdouble * params ) +{ + get_parameter( 1306, 8, target, index, params ); +} + + +void __indirect_glGetVertexAttribPointervNV( GLuint index, GLenum pname, + GLvoid ** pointer ) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); + + if ( pname != GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB ) { + __glXSetError( gc, GL_INVALID_ENUM ); + } + + if ( ! __glXGetArrayPointer( state, GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB, + index, pointer ) ) { + __glXSetError( gc, GL_INVALID_VALUE ); + } +} + + +/** + * Get the selected attribute from the vertex array state vector. + * + * \returns + * On success \c GL_TRUE is returned. Otherwise, \c GL_FALSE is returned. + */ +static GLboolean +get_attrib_array_data( __GLXattribute * state, GLuint index, GLenum cap, + GLintptr * data ) +{ + GLboolean retval = GL_FALSE; + const GLenum attrib = GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB; + + switch( cap ) { + case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: + retval = __glXGetArrayEnable( state, attrib, index, data ); + break; + + case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: + retval = __glXGetArraySize( state, attrib, index, data ); + break; + + case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: + retval = __glXGetArrayStride( state, attrib, index, data ); + break; + + case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: + retval = __glXGetArrayType( state, attrib, index, data ); + break; + + case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB: + retval = __glXGetArrayNormalized( state, attrib, index, data ); + break; + } + + + return retval; +} + + +static void get_vertex_attrib( __GLXcontext * gc, unsigned vop, + GLuint index, GLenum pname, + xReply * reply ) +{ + Display * const dpy = gc->currentDpy; + GLubyte * const pc = __glXSetupVendorRequest(gc, + X_GLXVendorPrivateWithReply, + vop, 8); + + *((uint32_t *)(pc + 0)) = index; + *((uint32_t *)(pc + 4)) = pname; + + (void) _XReply( dpy, reply, 0, False ); +} + + +void __indirect_glGetVertexAttribivARB( GLuint index, GLenum pname, + GLint * params ) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + Display * const dpy = gc->currentDpy; + __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); + xGLXSingleReply reply; + + + get_vertex_attrib( gc, 1303, index, pname, (xReply *) & reply ); + + if ( reply.size != 0 ) { + if ( ! get_attrib_array_data( state, index, pname, params ) ) { + if (reply.size == 1) { + *params = (GLint) reply.pad3; + } + else { + _XRead(dpy, (void *) params, 4 * reply.size); + } + } + } + + UnlockDisplay(dpy); + SyncHandle(); +} + + +void __indirect_glGetVertexAttribfvARB( GLuint index, GLenum pname, + GLfloat * params ) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + Display * const dpy = gc->currentDpy; + __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); + xGLXSingleReply reply; + + + get_vertex_attrib( gc, 1302, index, pname, (xReply *) & reply ); + + if ( reply.size != 0 ) { + GLintptr data; + + + if ( get_attrib_array_data( state, index, pname, & data ) ) { + *params = (GLfloat) data; + } + else { + if (reply.size == 1) { + (void) memcpy( params, & reply.pad3, sizeof( GLfloat ) ); + } + else { + _XRead(dpy, (void *) params, 4 * reply.size); + } + } + } + + UnlockDisplay(dpy); + SyncHandle(); +} + + +void __indirect_glGetVertexAttribdvARB( GLuint index, GLenum pname, + GLdouble * params ) +{ + __GLXcontext * const gc = __glXGetCurrentContext(); + Display * const dpy = gc->currentDpy; + __GLXattribute * state = (__GLXattribute *)(gc->client_state_private); + xGLXSingleReply reply; + + + get_vertex_attrib( gc, 1301, index, pname, (xReply *) & reply ); + + if ( reply.size != 0 ) { + GLintptr data; + + + if ( get_attrib_array_data( state, index, pname, & data ) ) { + *params = (GLdouble) data; + } + else { + if (reply.size == 1) { + (void) memcpy( params, & reply.pad3, sizeof( GLdouble ) ); + } + else { + _XRead(dpy, (void *) params, 8 * reply.size); + } + } + } + + UnlockDisplay(dpy); + SyncHandle(); +} diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml index b4c568b05e5..47896d898d7 100644 --- a/src/mesa/glapi/gl_API.xml +++ b/src/mesa/glapi/gl_API.xml @@ -5317,13 +5317,39 @@ glx: - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5333,35 +5359,85 @@ glx: - + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5399,97 +5475,91 @@ glx: - - + + - - + + - - + + - - + - - + - - + - - + - - + - - + @@ -5497,13 +5567,12 @@ glx: - - + @@ -5511,13 +5580,12 @@ glx: - - + @@ -5525,13 +5593,12 @@ glx: - - + @@ -5540,13 +5607,12 @@ glx: - - + @@ -5555,13 +5621,12 @@ glx: - - + @@ -5570,13 +5635,12 @@ glx: - - + @@ -5585,13 +5649,12 @@ glx: - - + @@ -5603,55 +5666,55 @@ glx: - + - + - + - + - + - + - + - + - + @@ -5661,25 +5724,25 @@ glx: - + - + - + - - - + + + @@ -5702,7 +5765,6 @@ glx: - @@ -5710,18 +5772,15 @@ glx: - - - + - @@ -5729,15 +5788,13 @@ glx: - - - + @@ -5747,14 +5804,13 @@ glx: - - + @@ -5764,58 +5820,68 @@ glx: - - + - + + - + - - + - + - + + - - + + - + @@ -9456,109 +9522,221 @@ glx: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - + + - - + + + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - + @@ -9566,7 +9744,7 @@ glx: - + @@ -9576,14 +9754,13 @@ glx: - - + @@ -9593,44 +9770,35 @@ glx: - - + - - - - + + - - - - + + - - - + + + @@ -9638,7 +9806,7 @@ glx: - + @@ -9647,169 +9815,157 @@ glx: - + - + - - + - + - - + + - + - - + + - + - - + + - + - + + - + - - + + - + - - - + + + + - + - - + + - + - - - + - - + + - + - - - + + - + - - + + - + - - - - + + + - + - - + + - + - + - + - - + + - + - - - - + - + - - + + - + - - - - + - - + + - + - - - - - + + + - + - - + + - + - - - - - + + + + - + - - + + @@ -9818,144 +9974,103 @@ glx: - - - - - - - - - - - - - - - - + - + - + - - - - + + - + - - - - + + - + - - + + + - + + + + + - + - - - - + + - - - - + + - + - + + + - - + + + + + - + - - - - + + - + - - - - + + - + - - - - + + - - - - + + @@ -10240,56 +10355,54 @@ glx: - - + + - - - + + - - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -10359,6 +10472,41 @@ glx: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +