Module: Mesa Branch: master Commit: 6f6e711c721eba8dad1541479e31d5db5108b41d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f6e711c721eba8dad1541479e31d5db5108b41d
Author: Dylan Baker <[email protected]> Date: Mon Apr 2 15:29:45 2018 -0700 mesa: ensure that variable is initialized This variable controls whether we link using the glsl code path or the spirv path. It's set when we validate that all shaders are glsl or spirv, but if there are no shaders attached to the program it will remain unset, resulting in undefined behavior. We want to go down the glsl path in that case, so initialize to false. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105820 Fixes: 16f6634e7fb5ada308e55b852cd49251e7f3f8b1 ("mesa/program: Link SPIR-V shaders using the SPIR-V code-path") Signed-off-by: Dylan Baker <[email protected]> Tested-by: Mark Janes <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]> --- src/mesa/program/ir_to_mesa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 49ef5ea52d..60fb24bf66 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -3126,7 +3126,7 @@ void _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) { unsigned int i; - bool spirv; + bool spirv = false; _mesa_clear_shader_program_data(ctx, prog); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
