[PATCH xserver 02/19] glamor: Label programs before linking them.
Eric Anholt
eric at anholt.net
Wed Jan 27 17:56:31 PST 2016
i965 does most of its compiling at link time, so our debug output for
its shaders didn't have the name on.
Signed-off-by: Eric Anholt <eric at anholt.net>
---
glamor/glamor_core.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c
index 0104b88..b9948b5 100644
--- a/glamor/glamor_core.c
+++ b/glamor/glamor_core.c
@@ -87,6 +87,17 @@ glamor_link_glsl_prog(ScreenPtr screen, GLint prog, const char *format, ...)
GLint ok;
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
+ if (glamor_priv->has_khr_debug) {
+ char *label;
+ va_list va;
+
+ va_start(va, format);
+ XNFvasprintf(&label, format, va);
+ glObjectLabel(GL_PROGRAM, prog, -1, label);
+ free(label);
+ va_end(va);
+ }
+
glLinkProgram(prog);
glGetProgramiv(prog, GL_LINK_STATUS, &ok);
if (!ok) {
@@ -100,17 +111,6 @@ glamor_link_glsl_prog(ScreenPtr screen, GLint prog, const char *format, ...)
ErrorF("Failed to link: %s\n", info);
FatalError("GLSL link failure\n");
}
-
- if (glamor_priv->has_khr_debug) {
- char *label;
- va_list va;
-
- va_start(va, format);
- XNFvasprintf(&label, format, va);
- glObjectLabel(GL_PROGRAM, prog, -1, label);
- free(label);
- va_end(va);
- }
}
/*
--
2.6.4
More information about the xorg-devel
mailing list