diff options
author | Kenneth Graunke <[email protected]> | 2014-02-25 22:15:30 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-02-26 02:31:24 -0800 |
commit | f896e82301255177894a6c51883e18d32c36b307 (patch) | |
tree | 7d57abf3630838a7656de3afe109dedc9dac0116 | |
parent | b18871c863fabec3ed383881d2cdd0298b157b06 (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.cpp | 2 |
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) |