intel/elk: Fix wrong destination to memset

Conversion to use rzalloc_array missed these.

Fixes: c9e667b7ad ("intel/elk: Remove uses of VLAs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12513
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33192>
This commit is contained in:
Caio Oliveira
2025-01-23 12:48:03 -08:00
committed by Marge Bot
parent c670bbc093
commit ee625f44d5

View File

@@ -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++) {