Mesa (main): r600: Set the last bit if an alu group is split by kcache allocation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 12 12:16:41 UTC 2022


Module: Mesa
Branch: main
Commit: 050e05db22f8cc0e4bdaaa07102b5c50eef9f88e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=050e05db22f8cc0e4bdaaa07102b5c50eef9f88e

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Tue Feb  8 23:14:21 2022 +0100

r600: Set the last bit if an alu group is split by kcache allocation

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Acked-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15714>

---

 src/gallium/drivers/r600/r600_asm.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index f6f8bfd4898..060511e6cef 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -1129,6 +1129,15 @@ static int r600_bytecode_alloc_kcache_lines(struct r600_bytecode *bc,
 
 	if ((r = r600_bytecode_alloc_inst_kcache_lines(bc, kcache, alu))) {
 		/* can't alloc, need to start new clause */
+
+		/* Make sure the CF ends with an "last" instruction when
+		 * we split an ALU group because of a new CF */
+		if (!list_is_empty(&bc->cf_last->alu))  {
+			struct r600_bytecode_alu *last_submitted =
+				list_last_entry(&bc->cf_last->alu, struct r600_bytecode_alu, list);
+				last_submitted->last = 1;
+		}
+
 		if ((r = r600_bytecode_add_cf(bc))) {
 			return r;
 		}



More information about the mesa-commit mailing list