summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-02-25 22:15:30 -0800
committerIan Romanick <[email protected]>2014-02-26 18:07:11 -0800
commit09b03dcee6c27af5bf5ef05f50773f2be0769892 (patch)
tree6181a28dfff88670bd20c3ce29a8f51c0027cf5e /src
parent45cb6063e7535b4aac94d81bbbfe6f835117d377 (diff)
i965: Don't try to dump shader source for fixed-function FS programs.
sh->Source is NULL and this will segfault. Fixes MESA_GLSL=dump with "The Swapper". Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (cherry picked from commit f896e82301255177894a6c51883e18d32c36b307)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 739c51686d5..43ae5609c47 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -258,7 +258,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
}
}
- if (ctx->Shader.Flags & GLSL_DUMP) {
+ if ((ctx->Shader.Flags & GLSL_DUMP) && shProg->Name != 0) {
for (unsigned i = 0; i < shProg->NumShaders; i++) {
const struct gl_shader *sh = shProg->Shaders[i];
if (!sh)