Mesa (main): pan/bi: Handle asymmetric staging in bi_count_read_registers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 29 23:53:26 UTC 2021
Module: Mesa
Branch: main
Commit: 502ffe6fbf3e96a72fd3533e41aea26f3b6f570b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=502ffe6fbf3e96a72fd3533e41aea26f3b6f570b
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Wed Jul 28 19:48:06 2021 -0400
pan/bi: Handle asymmetric staging in bi_count_read_registers
Needed for atomics.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12130>
---
src/panfrost/bifrost/bir.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/panfrost/bifrost/bir.c b/src/panfrost/bifrost/bir.c
index fa45ee7d1f1..6433726c80b 100644
--- a/src/panfrost/bifrost/bir.c
+++ b/src/panfrost/bifrost/bir.c
@@ -86,7 +86,10 @@ bi_count_staging_registers(const bi_instr *ins)
unsigned
bi_count_read_registers(const bi_instr *ins, unsigned s)
{
- if (s == 0 && bi_opcode_props[ins->op].sr_read)
+ /* PATOM_C reads 1 but writes 2 */
+ if (s == 0 && ins->op == BI_OPCODE_PATOM_C_I32)
+ return 1;
+ else if (s == 0 && bi_opcode_props[ins->op].sr_read)
return bi_count_staging_registers(ins);
else
return 1;
More information about the mesa-commit
mailing list