Mesa (master): aco: fix scheduling with s_memtime/s_memrealtime

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 16 15:08:39 UTC 2019


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

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Thu Oct 10 17:04:06 2019 +0100

aco: fix scheduling with s_memtime/s_memrealtime

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>

---

 src/amd/compiler/aco_scheduler.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp
index 09076a9a71f..67264fcf14f 100644
--- a/src/amd/compiler/aco_scheduler.cpp
+++ b/src/amd/compiler/aco_scheduler.cpp
@@ -110,6 +110,10 @@ bool can_move_instr(aco_ptr<Instruction>& instr, Instruction* current, int movin
    if (instr->format == Format::EXP)
       return false;
 
+   /* don't move s_memtime/s_memrealtime */
+   if (instr->opcode == aco_opcode::s_memtime || instr->opcode == aco_opcode::s_memrealtime)
+      return false;
+
    /* handle barriers */
 
    /* TODO: instead of stopping, maybe try to move the barriers and any
@@ -191,6 +195,10 @@ void schedule_SMEM(sched_ctx& ctx, Block* block,
    int16_t k = 0;
    bool can_reorder_cur = can_reorder(current, false);
 
+   /* don't move s_memtime/s_memrealtime */
+   if (current->opcode == aco_opcode::s_memtime || current->opcode == aco_opcode::s_memrealtime)
+      return;
+
    /* create the initial set of values which current depends on */
    std::fill(ctx.depends_on.begin(), ctx.depends_on.end(), false);
    for (const Operand& op : current->operands) {




More information about the mesa-commit mailing list