[Mesa-dev] [PATCH 06/13] glx: glX_proto_send.py: use correct compile guard GLX_INDIRECT_RENDERING

Emil Velikov emil.l.velikov at gmail.com
Fri Apr 28 13:14:22 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

The code itself has nothing to do with shared glapi, thus having it
behind GLX_SHARED_GLAPI is misleading. Use GLX_INDIRECT_RENDERING
instead.

The latter macro is set at global scope by the Autotools and Scons build
systems.

Cc: mesa-stable at lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/glx/glxcmds.c                    | 2 +-
 src/mapi/glapi/gen/glX_proto_send.py | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 53c9f9ce2af..a3af417a6bd 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -2651,7 +2651,7 @@ _GLX_PUBLIC void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
    f = (gl_function) get_glx_proc_address((const char *) procName);
    if ((f == NULL) && (procName[0] == 'g') && (procName[1] == 'l')
        && (procName[2] != 'X')) {
-#ifdef GLX_SHARED_GLAPI
+#ifdef GLX_INDIRECT_RENDERING
       f = (gl_function) __indirect_get_proc_address((const char *) procName);
 #endif
       if (!f)
diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py
index 6115c9b1d85..d458214fb74 100644
--- a/src/mapi/glapi/gen/glX_proto_send.py
+++ b/src/mapi/glapi/gen/glX_proto_send.py
@@ -382,7 +382,7 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
                     procs[n] = func.static_glx_name(n)
 
         print """
-#ifdef GLX_SHARED_GLAPI
+#ifdef GLX_INDIRECT_RENDERING
 
 static const struct proc_pair
 {
@@ -418,7 +418,7 @@ __indirect_get_proc_address(const char *name)
    return (pair) ? pair->proc : NULL;
 }
 
-#endif /* GLX_SHARED_GLAPI */
+#endif /* GLX_INDIRECT_RENDERING */
 """
         return
 
@@ -1113,7 +1113,7 @@ extern _X_HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupVendorRequest(
                     break
 
         print ''
-        print '#ifdef GLX_SHARED_GLAPI'
+        print '#ifdef GLX_INDIRECT_RENDERING'
         print 'extern _X_HIDDEN void (*__indirect_get_proc_address(const char *name))(void);'
         print '#endif'
 
-- 
2.12.1



More information about the mesa-dev mailing list