[PATCH] Stop defining GL_GLEXT_PROTOTYPES

Keith Packard keithp at keithp.com
Tue Feb 4 20:07:54 PST 2014


It looks like GL_GLEXT_PROTOTYPES is just a trap for the unwary,
causing glext.h to define a pile of functions which are also defined
in gl.h.

However, there is *one* function used in the server which is not
defined in gl.h and is only defined in glext.h when
GL_GLEXT_PROTOTYPES is defined, glGetCompressedTexImageARB.

I've explicitly defined that and added a warning message to the
compiler output as I don't know what the right fix is, but I suspect
it involves looking the function up with GetProcAddress, and I suspect
Eric will fix this by moving the server to libepoxy.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 glamor/glamor_egl.c                | 1 -
 glx/glxserver.h                    | 1 -
 glx/indirect_texture_compression.c | 3 +++
 hw/dmx/glxProxy/glxserver.h        | 1 -
 4 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index 2f97a83..c433477 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -37,7 +37,6 @@
 #include <errno.h>
 #include <xf86.h>
 #include <xf86drm.h>
-#define GL_GLEXT_PROTOTYPES
 #define EGL_EGLEXT_PROTOTYPES
 #define EGL_DISPLAY_NO_X_MESA
 
diff --git a/glx/glxserver.h b/glx/glxserver.h
index 7f36e5f..3f2ae35 100644
--- a/glx/glxserver.h
+++ b/glx/glxserver.h
@@ -46,7 +46,6 @@
 #include <resource.h>
 #include <scrnintstr.h>
 
-#define GL_GLEXT_PROTOTYPES     /* we want prototypes */
 #include <GL/gl.h>
 #include <GL/glext.h>
 #include <GL/glxproto.h>
diff --git a/glx/indirect_texture_compression.c b/glx/indirect_texture_compression.c
index 94de47d..8fc38a5 100644
--- a/glx/indirect_texture_compression.c
+++ b/glx/indirect_texture_compression.c
@@ -35,6 +35,9 @@
 #include "indirect_size_get.h"
 #include "indirect_dispatch.h"
 
+#warning "using direct call to glGetCompressedTexImageARB"
+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img);
+
 int
 __glXDisp_GetCompressedTexImage(struct __GLXclientStateRec *cl, GLbyte * pc)
 {
diff --git a/hw/dmx/glxProxy/glxserver.h b/hw/dmx/glxProxy/glxserver.h
index 754ad30..bc19582 100644
--- a/hw/dmx/glxProxy/glxserver.h
+++ b/hw/dmx/glxProxy/glxserver.h
@@ -41,7 +41,6 @@
 #include <resource.h>
 #include <scrnintstr.h>
 
-#define GL_GLEXT_PROTOTYPES     /* we want prototypes */
 #include <GL/gl.h>
 #include <GL/glxproto.h>
 #include <GL/glxint.h>
-- 
1.8.5.3



More information about the xorg-devel mailing list