[Mesa-dev] [PATCH] mesa: ensure that variable is initialized
Alejandro Piñeiro
apinheiro at igalia.com
Tue Apr 3 06:21:51 UTC 2018
Thanks for the patch!
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
On 03/04/18 00:36, Dylan Baker wrote:
> Otherwise this variable will only be set if there are spirv shaders
> present, but it's used regardless, resulting in undefined behavior.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105820
> CC: Alejandro Piñeiro <apinheiro at igalia.com>
> CC: Mark Janes <mark.a.janes at intel.com>
> Signed-off-by: Dylan Baker <dylan.c.baker at intel.com>
> ---
> 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 49ef5ea52d8..60fb24bf664 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);
>
More information about the mesa-dev
mailing list