Commit b8229cc5 authored by Eric Anholt's avatar Eric Anholt

glamor: Label programs before linking them.

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's avatarEric Anholt <eric@anholt.net>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
parent 68f236eb
......@@ -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);
}
}
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment