From 4715502975410855cf9997075fa9c598df0c5211 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 29 Apr 2020 16:55:16 -0700 Subject: [PATCH] freedreno/ir3: Initialize the unused dwords of the immediates consts. Avoids having spurious differences (and weird values to look at!) in traces from uninitialized memory. Part-of: --- src/freedreno/ir3/ir3_cp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/freedreno/ir3/ir3_cp.c b/src/freedreno/ir3/ir3_cp.c index 22023b0ac67..cb5f88630b1 100644 --- a/src/freedreno/ir3/ir3_cp.c +++ b/src/freedreno/ir3/ir3_cp.c @@ -343,6 +343,9 @@ lower_immed(struct ir3_cp_ctx *ctx, struct ir3_register *reg, unsigned new_flags const_state->immediates_size += 4; const_state->immediates = realloc (const_state->immediates, const_state->immediates_size * sizeof(const_state->immediates[0])); + + for (int i = const_state->immediate_idx; i < const_state->immediates_size * 4; i++) + const_state->immediates[i / 4].val[i % 4] = 0xd0d0d0d0; } for (i = 0; i < const_state->immediate_idx; i++) { -- 2.30.2