From 7d1b8c8ab27935546d1f6baa978e96d5f00a50b3 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Mon, 26 Sep 2022 18:12:04 +0200 Subject: [PATCH] ir3: Delete outputs from fixup_regfootprint() We weren't considering the number of components, which means that we would overestimate the output size, which could result in nonsensical things like a reg footprint of larger than r48.x. In addition, in some cases we can force double regsize which would go badly if this miscalculated the reg footprint, although currently this only happens with compute shaders where there are no outputs. It's not actually necessary anyway, because any output must come from an input or something in the shader - this is how RA works. Just delete it. Part-of: --- src/freedreno/ir3/ir3_shader.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/freedreno/ir3/ir3_shader.c b/src/freedreno/ir3/ir3_shader.c index 3c2fde55cae..693173627ae 100644 --- a/src/freedreno/ir3/ir3_shader.c +++ b/src/freedreno/ir3/ir3_shader.c @@ -92,22 +92,6 @@ fixup_regfootprint(struct ir3_shader_variant *v) } } - for (i = 0; i < v->outputs_count; i++) { - /* for ex, VS shaders with tess don't have normal varying outs: */ - if (!VALIDREG(v->outputs[i].regid)) - continue; - int32_t regid = v->outputs[i].regid + 3; - if (v->outputs[i].half) { - if (!v->mergedregs) { - v->info.max_half_reg = MAX2(v->info.max_half_reg, regid >> 2); - } else { - v->info.max_reg = MAX2(v->info.max_reg, regid >> 3); - } - } else { - v->info.max_reg = MAX2(v->info.max_reg, regid >> 2); - } - } - for (i = 0; i < v->num_sampler_prefetch; i++) { unsigned n = util_last_bit(v->sampler_prefetch[i].wrmask) - 1; int32_t regid = v->sampler_prefetch[i].dst + n;