]> git.cworth.org Git - fips/commit
dispatch: Fix dispatcher to perform lookup for the GetProcAddress functions
authorCarl Worth <cworth@cworth.org>
Fri, 25 Oct 2013 22:12:25 +0000 (15:12 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 28 Oct 2013 18:15:20 +0000 (11:15 -0700)
commit67c01d9b406d07b558255f35872cc549e4493e05
tree16a6672e2f6121633dd3666d068fee56f938d7de
parent3b579d69622d53b95c6259daf0ecb4f5d2b1798b
dispatch: Fix dispatcher to perform lookup for the GetProcAddress functions

Previously, the fips dispatch code was directly calling
glxGetProcAddressARB and eglGetProcAddress. This meant that the
dispatch code was calling into fips's own version of these functions.

Up until now, that has worked fine, since fips was not implementing
wrappers for any of the functions supported by fips-dispatch, so
fips's GetProcAddress functions were successfully calling the "real"
GetProcAddress functions and the dispatch code was calling the real
functions.

However, we're about to start adding wrappers for functions that are
also dispatched, (such as glBeginQuery). At this point, it would be
incorrect for the dispatch code to return the fips-wrapped
versions. The whole point of wrapping these functions is to make the
application calls into these functions different than the fips calls
into the real functions (through the dispatch).

To fix this, we ensure that the dispatch code calls glwrap_lookup or
eglwrap_lookup to locate the "real" GetProcAddress functions which in
turn ensures that the dispatch code will never resolve to a wrapped
function.
eglwrap.c
eglwrap.h [new file with mode: 0644]
fips-dispatch.c