From: Eric Anholt Date: Wed, 29 Apr 2020 23:55:16 +0000 (-0700) Subject: freedreno/ir3: Initialize the unused dwords of the immediates consts. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4715502975410855cf9997075fa9c598df0c5211;p=mesa.git 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: --- 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++) {