From ee625f44d5653d2c3c0d7d6b35c87505afe8a705 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Thu, 23 Jan 2025 12:48:03 -0800 Subject: [PATCH] intel/elk: Fix wrong destination to memset Conversion to use rzalloc_array missed these. Fixes: c9e667b7ade ("intel/elk: Remove uses of VLAs") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12513 Reviewed-by: Paulo Zanoni Part-of: --- src/intel/compiler/elk/elk_vec4_copy_propagation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/elk/elk_vec4_copy_propagation.cpp b/src/intel/compiler/elk/elk_vec4_copy_propagation.cpp index 7aae45c2820..a6dcb67b4ca 100644 --- a/src/intel/compiler/elk/elk_vec4_copy_propagation.cpp +++ b/src/intel/compiler/elk/elk_vec4_copy_propagation.cpp @@ -476,7 +476,7 @@ vec4_visitor::opt_copy_propagation(bool do_constant_prop) * src/glsl/opt_copy_propagation.cpp to track available copies. */ if (!is_dominated_by_previous_instruction(inst)) { - memset(&entries, 0, sizeof(copy_entry) * alloc.total_size); + memset(entries, 0, sizeof(copy_entry) * alloc.total_size); continue; } @@ -530,7 +530,7 @@ vec4_visitor::opt_copy_propagation(bool do_constant_prop) * our destination's updated channels, as the two are no longer equal. */ if (inst->dst.reladdr) - memset(&entries, 0, sizeof(copy_entry) * alloc.total_size); + memset(entries, 0, sizeof(copy_entry) * alloc.total_size); else { for (unsigned i = 0; i < alloc.total_size; i++) { for (int j = 0; j < 4; j++) {