Module: Mesa Branch: 10.1 Commit: 09b03dcee6c27af5bf5ef05f50773f2be0769892 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=09b03dcee6c27af5bf5ef05f50773f2be0769892
Author: Kenneth Graunke <[email protected]> Date: Tue Feb 25 22:15:30 2014 -0800 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) --- src/mesa/drivers/dri/i965/brw_shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 739c516..43ae560 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) _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
