diff options
author | Adam Jackson <ajax@redhat.com> | 2013-12-03 13:11:09 -0500 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-12-10 08:02:42 -0800 |
commit | 6b93e1f5ff39c6ac5b0d97d4245aeac9113eed8b (patch) | |
tree | 47216682c7a06e809657c7a705414ac936b81518 /glx/indirect_program.c | |
parent | c4567a376083eb7b142a7f003ddf8372d376ea86 (diff) |
glx: Convert non-generated function pointer thunking
Same concept as the generated code conversion.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Diffstat (limited to 'glx/indirect_program.c')
-rw-r--r-- | glx/indirect_program.c | 34 |
1 files changed, 24 insertions, 10 deletions
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); } |