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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18840>
This commit is contained in:
Connor Abbott 2022-09-26 18:12:04 +02:00 committed by Marge Bot
parent 34a390569d
commit 7d1b8c8ab2

View file

@ -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;