r600/sb: schedule LDS ops in appropriate places.
authorDave Airlie <airlied@redhat.com>
Wed, 10 Jan 2018 04:41:02 +0000 (04:41 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 18 Jan 2018 03:38:05 +0000 (03:38 +0000)
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@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/sb/sb_bc.h
src/gallium/drivers/r600/sb/sb_sched.cpp

index 3a3bae9d445cf76c07da1cb24b3cdb6592d5a3b4..b35671bf0ff72dc9c0c1585498f346980b108124 100644 (file)
@@ -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;
        }
 
index 1feef585dfb5f8165d0b382ed121a53e90504b3a..f5fd84d54ac9581048d7d6a778625878473f06f3 100644 (file)
@@ -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;