Index: g_disptab_EXT.c =================================================================== --- g_disptab_EXT.c (original) +++ g_disptab_EXT.c (working copy) @@ -2185,28 +2185,28 @@ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4180 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4190 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, + __glXDisp_BindProgramNV, /* 4180 */ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, + __glXDisp_ProgramEnvParameter4fvARB, /* 4184 */ + __glXDisp_ProgramEnvParameter4dvARB, /* 4185 */ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4200 */ __glXNoSuchRenderOpcode, + __glXDisp_VertexAttrib1svARB, /* 4189 */ + __glXDisp_VertexAttrib2svARB, /* 4190 */ + __glXDisp_VertexAttrib3svARB, /* 4191 */ + __glXDisp_VertexAttrib4svARB, /* 4192 */ + __glXDisp_VertexAttrib1fvARB, /* 4193 */ + __glXDisp_VertexAttrib2fvARB, /* 4194 */ + __glXDisp_VertexAttrib3fvARB, /* 4195 */ + __glXDisp_VertexAttrib4fvARB, /* 4196 */ + __glXDisp_VertexAttrib1dvARB, /* 4197 */ + __glXDisp_VertexAttrib2dvARB, /* 4198 */ + __glXDisp_VertexAttrib3dvARB, /* 4199 */ + __glXDisp_VertexAttrib4dvARB, /* 4200 */ + __glXDisp_VertexAttrib4NubvARB, /* 4201 */ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, @@ -2220,9 +2220,9 @@ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, + __glXDisp_ProgramLocalParameter4fvARB, /* 4215 */ + __glXDisp_ProgramLocalParameter4dvARB, /* 4216 */ + __glXDisp_ProgramStringARB, /* 4217 */ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, /* 4219 */ #ifndef MISSING_GL_EXTS @@ -2241,16 +2241,16 @@ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, + __glXDisp_VertexAttrib4bvARB, /* 4230 */ + __glXDisp_VertexAttrib4ivARB, /* 4231 */ + __glXDisp_VertexAttrib4ubvARB, /* 4232 */ + __glXDisp_VertexAttrib4usvARB, /* 4233 */ + __glXDisp_VertexAttrib4uivARB, /* 4234 */ + __glXDisp_VertexAttrib4NbvARB, /* 4235 */ + __glXDisp_VertexAttrib4NsvARB, /* 4236 */ + __glXDisp_VertexAttrib4NivARB, /* 4237 */ + __glXDisp_VertexAttrib4NusvARB, /* 4238 */ + __glXDisp_VertexAttrib4NuivARB, /* 4239 */ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, @@ -4494,28 +4494,28 @@ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4180 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4190 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, + __glXDispSwap_BindProgramNV, /* 4180 */ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, + __glXDispSwap_ProgramEnvParameter4fvARB, /* 4184 */ + __glXDispSwap_ProgramEnvParameter4dvARB, /* 4185 */ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4200 */ __glXNoSuchRenderOpcode, + __glXDispSwap_VertexAttrib1svARB, /* 4189 */ + __glXDispSwap_VertexAttrib2svARB, /* 4190 */ + __glXDispSwap_VertexAttrib3svARB, /* 4191 */ + __glXDispSwap_VertexAttrib4svARB, /* 4192 */ + __glXDispSwap_VertexAttrib1fvARB, /* 4193 */ + __glXDispSwap_VertexAttrib2fvARB, /* 4194 */ + __glXDispSwap_VertexAttrib3fvARB, /* 4195 */ + __glXDispSwap_VertexAttrib4fvARB, /* 4196 */ + __glXDispSwap_VertexAttrib1dvARB, /* 4197 */ + __glXDispSwap_VertexAttrib2dvARB, /* 4198 */ + __glXDispSwap_VertexAttrib3dvARB, /* 4199 */ + __glXDispSwap_VertexAttrib4dvARB, /* 4200 */ + __glXDispSwap_VertexAttrib4NubvARB, /* 4201 */ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, @@ -4529,9 +4529,9 @@ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, + __glXDispSwap_ProgramLocalParameter4fvARB, /* 4215 */ + __glXDispSwap_ProgramLocalParameter4dvARB, /* 4216 */ + __glXDispSwap_ProgramStringARB, /* 4217 */ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, /* 4219 */ #ifndef MISSING_GL_EXTS @@ -4550,16 +4550,16 @@ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, + __glXDispSwap_VertexAttrib4bvARB, /* 4230 */ + __glXDispSwap_VertexAttrib4ivARB, /* 4231 */ + __glXDispSwap_VertexAttrib4ubvARB, /* 4232 */ + __glXDispSwap_VertexAttrib4usvARB, /* 4233 */ + __glXDispSwap_VertexAttrib4uivARB, /* 4234 */ + __glXDispSwap_VertexAttrib4NbvARB, /* 4235 */ + __glXDispSwap_VertexAttrib4NsvARB, /* 4236 */ + __glXDispSwap_VertexAttrib4NivARB, /* 4237 */ + __glXDispSwap_VertexAttrib4NusvARB, /* 4238 */ + __glXDispSwap_VertexAttrib4NuivARB, /* 4239 */ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, Index: glxcmds.c =================================================================== --- glxcmds.c (original) +++ glxcmds.c (working copy) @@ -2340,6 +2340,30 @@ return __glXCreateGLXPixmapWithConfigSGIX(cl, pc); case X_GLXvop_GetDrawableAttributesSGIX: return __glXGetDrawableAttributesSGIX(cl, pc); + case X_GLvop_DeleteProgramARB: + return __glXDisp_DeleteProgramsNV(cl, pc); + case X_GLvop_GenProgramsARB: + return __glXDisp_GenProgramsNV(cl, pc); + case X_GLvop_GetProgramEnvParameterfvARB: + return __glXDisp_GetProgramEnvParameterfvARB(cl, pc); + case X_GLvop_GetProgramEnvParameterdvARB: + return __glXDisp_GetProgramEnvParameterdvARB(cl, pc); + case X_GLvop_GetProgramLocalParameterfvARB: + return __glXDisp_GetProgramLocalParameterfvARB(cl, pc); + case X_GLvop_GetProgramLocalParameterdvARB: + return __glXDisp_GetProgramLocalParameterdvARB(cl, pc); + case X_GLvop_GetProgramivARB: + return __glXDisp_GetProgramivARB(cl, pc); + case X_GLvop_GetProgramStringARB: + return __glXDisp_GetProgramStringARB(cl, pc); + case X_GLvop_GetVertexAttribdvARB: + return __glXDisp_GetVertexAttribdvARB(cl, pc); + case X_GLvop_GetVertexAttribfvARB: + return __glXDisp_GetVertexAttribfvARB(cl, pc); + case X_GLvop_GetVertexAttribivARB: + return __glXDisp_GetVertexAttribivARB(cl, pc); + case X_GLvop_IsProgramARB: + return __glXDisp_IsProgramNV(cl, pc); case X_GLvop_IsRenderbufferEXT: return __glXDisp_IsRenderbufferEXT(cl, pc); case X_GLvop_GenRenderbuffersEXT: Index: glxcmdsswap.c =================================================================== --- glxcmdsswap.c (original) +++ glxcmdsswap.c (working copy) @@ -973,6 +973,30 @@ return __glXSwapCreateGLXPixmapWithConfigSGIX(cl, pc); case X_GLXvop_GetDrawableAttributesSGIX: return __glXSwapGetDrawableAttributesSGIX(cl, pc); + case X_GLvop_DeleteProgramARB: + return __glXDispSwap_DeleteProgramsNV(cl, pc); + case X_GLvop_GenProgramsARB: + return __glXDispSwap_GenProgramsNV(cl, pc); + case X_GLvop_GetProgramEnvParameterfvARB: + return __glXDispSwap_GetProgramEnvParameterfvARB(cl, pc); + case X_GLvop_GetProgramEnvParameterdvARB: + return __glXDispSwap_GetProgramEnvParameterdvARB(cl, pc); + case X_GLvop_GetProgramLocalParameterfvARB: + return __glXDispSwap_GetProgramLocalParameterfvARB(cl, pc); + case X_GLvop_GetProgramLocalParameterdvARB: + return __glXDispSwap_GetProgramLocalParameterdvARB(cl, pc); + case X_GLvop_GetProgramivARB: + return __glXDispSwap_GetProgramivARB(cl, pc); + case X_GLvop_GetProgramStringARB: + return __glXDispSwap_GetProgramStringARB(cl, pc); + case X_GLvop_GetVertexAttribdvARB: + return __glXDispSwap_GetVertexAttribdvARB(cl, pc); + case X_GLvop_GetVertexAttribfvARB: + return __glXDispSwap_GetVertexAttribfvARB(cl, pc); + case X_GLvop_GetVertexAttribivARB: + return __glXDispSwap_GetVertexAttribivARB(cl, pc); + case X_GLvop_IsProgramARB: + return __glXDispSwap_IsProgramNV(cl, pc); case X_GLvop_IsRenderbufferEXT: return __glXDispSwap_IsRenderbufferEXT(cl, pc); case X_GLvop_GenRenderbuffersEXT: Index: glxscreens.c =================================================================== --- glxscreens.c (original) +++ glxscreens.c (working copy) @@ -65,6 +65,8 @@ "GL_ARB_transpose_matrix " "GL_ARB_window_pos " "GL_ARB_texture_non_power_of_two " + "GL_ARB_vertex_program " + "GL_ARB_fragment_program " "GL_EXT_abgr " "GL_EXT_bgra " "GL_EXT_blend_color " Index: rensizetab.c =================================================================== --- rensizetab.c (original) +++ rensizetab.c (working copy) @@ -2403,12 +2403,28 @@ /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, + /* BindProgramNV 4180 */ { 12, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, + /* ProgramEnvParameter4fvARB 4184 */ { 28, 0 }, + /* ProgramEnvParameter4dvARB 4185 */ { 44, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, + /* VertexAttrib1svARB 4189 */ { 12, 0 }, + /* VertexAttrib2svARB 4190 */ { 12, 0 }, + /* VertexAttrib3svARB 4191 */ { 16, 0 }, + /* VertexAttrib4svARB 4192 */ { 16, 0 }, + /* VertexAttrib1fvARB 4193 */ { 12, 0 }, + /* VertexAttrib2fvARB 4194 */ { 16, 0 }, + /* VertexAttrib3fvARB 4195 */ { 20, 0 }, + /* VertexAttrib4fvARB 4196 */ { 24, 0 }, + /* VertexAttrib1dvARB 4197 */ { 16, 0 }, + /* VertexAttrib2dvARB 4198 */ { 24, 0 }, + /* VertexAttrib3dvARB 4199 */ { 32, 0 }, + /* VertexAttrib4dvARB 4200 */ { 40, 0 }, + /* VertexAttrib4NubvARB 4201 */ { 12, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, @@ -2422,25 +2438,9 @@ /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, + /* ProgramLocalParameter4fvARB 4215 */ { 28, 0 }, + /* ProgramLocalParameter4dvARB 4216 */ { 44, 0 }, + /* ProgramStringARB 4217 */ { 16, __glXProgramStringARBReqSize }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* ActiveStencilFaceEXT 4220 */ { 8, 0 }, @@ -2453,16 +2453,16 @@ /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, + /* VertexAttrib4bvARB 4230 */ { 12, 0 }, + /* VertexAttrib4ivARB 4231 */ { 24, 0 }, + /* VertexAttrib4ubvARB 4232 */ { 12, 0 }, + /* VertexAttrib4usvARB 4233 */ { 16, 0 }, + /* VertexAttrib4uivARB 4234 */ { 24, 0 }, + /* VertexAttrib4NbvARB 4235 */ { 12, 0 }, + /* VertexAttrib4NsvARB 4236 */ { 16, 0 }, + /* VertexAttrib4NivARB 4237 */ { 24, 0 }, + /* VertexAttrib4NusvARB 4238 */ { 16, 0 }, + /* VertexAttrib4NuivARB 4239 */ { 24, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, Index: single2.c =================================================================== --- single2.c (original) +++ single2.c (working copy) @@ -393,3 +393,68 @@ { return DoGetString(cl, pc, GL_FALSE); } + +int DoGetProgramString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + ClientPtr client; + __GLXcontext *cx; + GLenum target; + GLenum pname; + __GLX_DECLARE_SWAP_VARIABLES; + int error; + char *string = NULL; + GLint length = 0; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + if ( need_swap ) { + __GLX_SWAP_INT(req->contextTag); + __GLX_SWAP_INT(pc); + __GLX_SWAP_INT(pc + 4); + } + + cx = __glXForceCurrent(cl, req->contextTag, &error); + if (!cx) { + return error; + } + + target = *(GLenum *)(pc); + pname = *(GLenum *)(pc + 4); + + CALL_GetProgramivNV( GET_DISPATCH(), + (target, GL_PROGRAM_LENGTH_ARB, &length) ); + + if (length) + { + string = xalloc (length + 1); + if (string) + { + CALL_GetProgramStringARB( GET_DISPATCH(), (target, pname, string) ); + } + else + length = 0; + } + + client = cl->client; + + __GLX_BEGIN_REPLY(length); + __GLX_PUT_SIZE(length); + + if ( need_swap ) { + __GLX_SWAP_REPLY_SIZE(); + __GLX_SWAP_REPLY_HEADER(); + } + + __GLX_SEND_HEADER(); + WriteToClient(client, length, (char *) string); + if (string != NULL) { + xfree(string); + } + return Success; +} + +int __glXDisp_GetProgramStringARB(__GLXclientState *cl, GLbyte *pc) +{ + return DoGetProgramString(cl, pc, GL_FALSE); +} Index: single2swap.c =================================================================== --- single2swap.c (original) +++ single2swap.c (working copy) @@ -271,3 +271,8 @@ { return DoGetString(cl, pc, GL_TRUE); } + +int __glXDispSwap_GetProgramStringARB(__GLXclientState *cl, GLbyte *pc) +{ + return DoGetProgramString(cl, pc, GL_TRUE); +}