[PATCH] glamor: workaround a libepoxy bug in glObjectLabel

Maarten Lankhorst maarten.lankhorst at ubuntu.com
Mon Jan 19 03:36:09 PST 2015


libepoxy doesn't handle this case well, and tries to look for the glObjectLabel symbol in GLES2.
As a result, using glObjectLabelKHR with opengl, or glObjectLabel with GLES will crash.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com>
---
diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c
index 737b274..9285b07 100644
--- a/glamor/glamor_core.c
+++ b/glamor/glamor_core.c
@@ -108,6 +108,9 @@ glamor_link_glsl_prog(ScreenPtr screen, GLint prog, const char *format, ...)
 
         va_start(va, format);
         XNFvasprintf(&label, format, va);
-        glObjectLabel(GL_PROGRAM, prog, -1, label);
+        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP)
+            glObjectLabel(GL_PROGRAM, prog, -1, label);
+        else
+            glObjectLabelKHR(GL_PROGRAM, prog, -1, label);
         free(label);
         va_end(va);
-- 
2.2.1



More information about the xorg-devel mailing list