summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2021-12-22 18:51:25 +0100
committerEric Engestrom <eric@engestrom.ch>2022-01-12 19:54:25 +0000
commitd761347e05a089ecabaf4623445554b5a1f06f32 (patch)
tree3513261d1a5fc16a0e9b201ad01ed54bb2d0a30f
parent7241ec2ee5ccd8cb74a45f7a646606e8aa58094f (diff)
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: 0ffcb19b9d9 ("ir3: Rewrite register allocation") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14246> (cherry picked from commit d371d807eb8bb2c6b7f199893b3824be89169811)
-rw-r--r--.pick_status.json2
-rw-r--r--src/freedreno/ir3/ir3_ra.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 08c39b47b21..9b44bdd3f30 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1264,7 +1264,7 @@
"description": "ir3/ra: Fix logic bug in compress_regs_left",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "0ffcb19b9d9fbe902224542047c389a661fbf816"
},
diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c
index a282b033c5d..0c8ece6f05c 100644
--- a/src/freedreno/ir3/ir3_ra.c
+++ b/src/freedreno/ir3/ir3_ra.c
@@ -968,9 +968,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 -