aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-02-25 22:15:30 -0800
committerKenneth Graunke <[email protected]>2014-02-26 02:31:24 -0800
commitf896e82301255177894a6c51883e18d32c36b307 (patch)
tree7d57abf3630838a7656de3afe109dedc9dac0116
parentb18871c863fabec3ed383881d2cdd0298b157b06 (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]>
-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 7034907ebab..173aeb6f6de 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)