r600/sb: hit the scheduler with a big hammer to avoid lds splits.
authorDave Airlie <airlied@redhat.com>
Wed, 10 Jan 2018 04:38:07 +0000 (04:38 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 18 Jan 2018 03:37:56 +0000 (03:37 +0000)
This tries to avoid an lds queue read getting scheduled separately
from an lds ret read, the non-sb code uses the same style of hammer,
this isn't foolproof.

We can do better, but it's a bit tricky, as you have to scan ahead
and either schedule more lds oq moves and more lds reads and that
could lead to you running out of space anyways.

Acked-By: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/sb/sb_sched.cpp

index 26e4811b1cec9fdfae47d5cd553da2f9bc991ec5..1feef585dfb5f8165d0b382ed121a53e90504b3a 100644 (file)
@@ -2034,6 +2034,9 @@ bool alu_clause_tracker::check_clause_limits() {
        // ...and index registers
        reserve_slots += (current_idx[0] != NULL) + (current_idx[1] != NULL);
 
+       if (gt.get_consumes_lds_oqa() && !outstanding_lds_oqa_reads)
+               reserve_slots += 60;
+
        if (slot_count + slots > MAX_ALU_SLOTS - reserve_slots)
                return false;