Mesa (master): r600/sb: schedule LDS ops in appropriate places.

Dave Airlie airlied at kemper.freedesktop.org
Thu Jan 18 03:39:44 UTC 2018


Module: Mesa
Branch: master
Commit: 8cfec333c08a9518735d261cc9d6a96d64276f1c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8cfec333c08a9518735d261cc9d6a96d64276f1c

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Jan 10 04:41:02 2018 +0000

r600/sb: schedule LDS ops in appropriate places.

So LDS ops have to be SLOT_X,
and LDS OQ reads have read port restrictions so we try
and force those into only having one per slot and avoiding
bank swizzles.

Acked-By: Roland Scheidegger <sroland at vmware.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/r600/sb/sb_bc.h      | 3 +++
 src/gallium/drivers/r600/sb/sb_sched.cpp | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/src/gallium/drivers/r600/sb/sb_bc.h b/src/gallium/drivers/r600/sb/sb_bc.h
index 3a3bae9d44..b35671bf0f 100644
--- a/src/gallium/drivers/r600/sb/sb_bc.h
+++ b/src/gallium/drivers/r600/sb/sb_bc.h
@@ -711,6 +711,9 @@ public:
 			mask = 0x0F;
 		if (!is_cayman() && (slot_flags & AF_S))
 			mask |= 0x10;
+		/* Force LDS_IDX ops into SLOT_X */
+		if (op_ptr->opcode[0] == -1 && ((op_ptr->opcode[1] & 0xFF) == 0x11))
+			mask = 0x01;
 		return mask;
 	}
 
diff --git a/src/gallium/drivers/r600/sb/sb_sched.cpp b/src/gallium/drivers/r600/sb/sb_sched.cpp
index 1feef585df..f5fd84d54a 100644
--- a/src/gallium/drivers/r600/sb/sb_sched.cpp
+++ b/src/gallium/drivers/r600/sb/sb_sched.cpp
@@ -461,6 +461,10 @@ bool alu_group_tracker::try_reserve(alu_node* n) {
 	if (n->uses_ar() && has_mova)
 		return false;
 
+	if (consumes_lds_oqa)
+		return false;
+	if (n->consumes_lds_oq() && available_slots != (sh.get_ctx().has_trans ? 0x1F : 0x0F))
+		return false;
 	for (unsigned i = 0; i < nsrc; ++i) {
 
 		unsigned last_id = next_id;




More information about the mesa-commit mailing list