From 6b93e1f5ff39c6ac5b0d97d4245aeac9113eed8b Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 3 Dec 2013 13:11:09 -0500 Subject: glx: Convert non-generated function pointer thunking Same concept as the generated code conversion. Signed-off-by: Adam Jackson Reviewed-by: Jon TURNEY --- glx/indirect_program.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'glx/indirect_program.c') diff --git a/glx/indirect_program.c b/glx/indirect_program.c index db22d845d..fa4a2408b 100644 --- a/glx/indirect_program.c +++ b/glx/indirect_program.c @@ -104,29 +104,43 @@ DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc, int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc) { - return DoGetProgramString(cl, pc, glGetProgramivARB, - glGetProgramStringARB, False); + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, False); } int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc) { - return DoGetProgramString(cl, pc, glGetProgramivARB, - glGetProgramStringARB, True); + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, True); } int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte * pc) { - return DoGetProgramString(cl, pc, (PFNGLGETPROGRAMIVARBPROC)glGetProgramivNV, - (PFNGLGETPROGRAMSTRINGARBPROC)glGetProgramStringNV, - False); + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, False); } int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte * pc) { - return DoGetProgramString(cl, pc, (PFNGLGETPROGRAMIVARBPROC)glGetProgramivNV, - (PFNGLGETPROGRAMSTRINGARBPROC)glGetProgramStringNV, - True); + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, True); } -- cgit v1.2.3