ir3/ra: Fix logic bug in compress_regs_left

If we're allocating a source then we force is_killed to false, not to
true. Fixes a regression in
dEQP-GLES31.functional.synchronization.in_invocation.image_atomic_write_read
later.

Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14246>
This commit is contained in:
Connor Abbott 2021-12-22 18:51:25 +01:00 committed by Marge Bot
parent c9adcb6051
commit d371d807eb

View file

@ -972,9 +972,9 @@ compress_regs_left(struct ra_ctx *ctx, struct ra_file *file, unsigned size,
assert(!interval->frozen);
/* Killed sources don't count because they go at the end and can
* overlap the register we're trying to add.
* overlap the register we're trying to add, unless it's a source.
*/
if (!interval->is_killed && !is_source) {
if (!interval->is_killed || is_source) {
removed_size += interval->physreg_end - interval->physreg_start;
if (interval->interval.reg->flags & IR3_REG_HALF) {
removed_half_size += interval->physreg_end -