[Mesa-dev] [PATCH 2/2] mapi: Make _glapi_get_stub work with "gl" or "mgl" prefix.

Kyle Brenneman kbrenneman at nvidia.com
Thu Sep 24 15:22:08 PDT 2015


When USE_MGL_NAMESPACE is defined, _glapi_get_stub will check for the "m"
prefix before trying to skip it, so that "glFoo" and "mglFoo" are
equivalent.

This should let it work with all the places where something calls
_glapi_get_proc_offset with a hard-coded name that starts with the normal
"gl" prefix.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55552
---
 src/mapi/mapi_glapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mapi/mapi_glapi.c b/src/mapi/mapi_glapi.c
index 7b9f1ae..c19bab4 100644
--- a/src/mapi/mapi_glapi.c
+++ b/src/mapi/mapi_glapi.c
@@ -174,7 +174,7 @@ _glapi_get_stub(const char *name, int generate)
    const struct mapi_stub *stub;
 
 #ifdef USE_MGL_NAMESPACE
-   if (name)
+   if (name && name[0] == 'm')
       name++;
 #endif
 
-- 
1.9.1



More information about the mesa-dev mailing list