From: Mike Blumenkrantz Date: Wed, 20 May 2020 13:39:45 +0000 (-0400) Subject: zink: explicitly zero some arrays in ntv X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=21a7fdf97c3c2ad4119fc478fe0f3f4b90ff411f;p=mesa.git zink: explicitly zero some arrays in ntv just to be safe Reviewed-by: Erik Faye-Lund Part-of: --- diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index e609a08caf6..4ba3d9db087 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -614,7 +614,7 @@ get_alu_src_raw(struct ntv_context *ctx, nir_alu_instr *alu, unsigned src) raw_type, used_channels); - SpvId constituents[NIR_MAX_VEC_COMPONENTS]; + SpvId constituents[NIR_MAX_VEC_COMPONENTS] = {0}; for (unsigned i = 0; i < used_channels; ++i) constituents[i] = def; @@ -627,7 +627,7 @@ get_alu_src_raw(struct ntv_context *ctx, nir_alu_instr *alu, unsigned src) raw_type, used_channels); - uint32_t components[NIR_MAX_VEC_COMPONENTS]; + uint32_t components[NIR_MAX_VEC_COMPONENTS] = {0}; size_t num_components = 0; for (unsigned i = 0; i < NIR_MAX_VEC_COMPONENTS; i++) { if (!nir_alu_instr_channel_used(alu, src, i))