]> git.cworth.org Git - fips/commitdiff
glxwrap: Initialize fips_dispatch when glxMakeContextCurrent is called
authorCarl Worth <cworth@cworth.org>
Tue, 27 Aug 2013 20:14:53 +0000 (13:14 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 27 Aug 2013 20:14:53 +0000 (13:14 -0700)
Previously, we only intitialized fips_dispatch if glxMakeCurrent was
called.  This caused fips to fail for programs that called
glxMakeContextCurrent instead. Both functions are now handled
indentically, (giving fips a clear indication that GLX is being used,
not EGL).

This fixes the failure of fips with Lightsmark 2008.

glxwrap.c

index cccc05f99e1295b0c51165cf226e61164cec956d..59d3e8eb35cdd9818b6f1d5678133f00a5d90a9f 100644 (file)
--- a/glxwrap.c
+++ b/glxwrap.c
@@ -86,3 +86,15 @@ glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx)
 
        return ret;
 }
+
+Bool
+glXMakeContextCurrent (Display *dpy, GLXDrawable drawable, GLXDrawable read, GLXContext ctx)
+{
+       Bool ret;
+
+       fips_dispatch_init (FIPS_API_GLX);
+
+       GLWRAP_DEFER_WITH_RETURN (ret, glXMakeContextCurrent, dpy, drawable, read, ctx);
+
+       return ret;
+}