From 552e9ddcc4916a63f942b0241ee017ad3a0c284c Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Fri, 15 Sep 2023 20:41:56 +0200 Subject: [PATCH] r600/sfn: Make address split pass obligatory Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/sfn/sfn_assembler.cpp | 5 +---- src/gallium/drivers/r600/sfn/sfn_debug.cpp | 1 - src/gallium/drivers/r600/sfn/sfn_debug.h | 1 - src/gallium/drivers/r600/sfn/sfn_nir.cpp | 9 +++------ 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/gallium/drivers/r600/sfn/sfn_assembler.cpp b/src/gallium/drivers/r600/sfn/sfn_assembler.cpp index 3bf92b7..f7be9e6 100644 --- a/src/gallium/drivers/r600/sfn/sfn_assembler.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_assembler.cpp @@ -450,9 +450,7 @@ AssamblerVisitor::visit(const AluGroup& group) if (group.slots() == 0) return; - - static const unsigned slot_limit = r600::sfn_log.has_debug_flag(r600::SfnLog::noaddrsplit) ? - 248 : 256; + static const unsigned slot_limit = 256; if (m_bc->cf_last && !m_bc->force_add_cf) { if (group.has_lds_group_start()) { @@ -478,7 +476,6 @@ AssamblerVisitor::visit(const AluGroup& group) instr->opcode() == op0_group_barrier && m_bc->cf_last->ndw + 14 > slot_limit) { assert(0 && "Not allowed to start new alu group here"); assert(m_bc->cf_last->nlds_read == 0); - assert(r600::sfn_log.has_debug_flag(r600::SfnLog::noaddrsplit)); m_bc->force_add_cf = 1; m_last_addr = nullptr; } diff --git a/src/gallium/drivers/r600/sfn/sfn_debug.cpp b/src/gallium/drivers/r600/sfn/sfn_debug.cpp index 19b1798..b41ebec 100644 --- a/src/gallium/drivers/r600/sfn/sfn_debug.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_debug.cpp @@ -65,7 +65,6 @@ static const struct debug_named_value sfn_debug_options[] = { {"opt", SfnLog::opt, "Log optimization" }, {"steps", SfnLog::steps, "Log shaders at transformation steps" }, {"noopt", SfnLog::noopt, "Don't run backend optimizations" }, - {"noaddrsplit", SfnLog::noaddrsplit, "Don't split address loads early" }, {"warn" , SfnLog::warn, "Print warnings" }, DEBUG_NAMED_VALUE_END }; diff --git a/src/gallium/drivers/r600/sfn/sfn_debug.h b/src/gallium/drivers/r600/sfn/sfn_debug.h index 620b2fe..59519db 100644 --- a/src/gallium/drivers/r600/sfn/sfn_debug.h +++ b/src/gallium/drivers/r600/sfn/sfn_debug.h @@ -70,7 +70,6 @@ public: nomerge = 1 << 16, steps = 1 << 17, noopt = 1 << 18, - noaddrsplit = 1 << 19, warn = 1 << 20, }; diff --git a/src/gallium/drivers/r600/sfn/sfn_nir.cpp b/src/gallium/drivers/r600/sfn/sfn_nir.cpp index b295636..048d16e 100644 --- a/src/gallium/drivers/r600/sfn/sfn_nir.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_nir.cpp @@ -965,8 +965,7 @@ r600_shader_from_nir(struct r600_context *rctx, } } - if (!r600::sfn_log.has_debug_flag(r600::SfnLog::noaddrsplit)) - split_address_loads(*shader); + split_address_loads(*shader); if (r600::sfn_log.has_debug_flag(r600::SfnLog::steps)) { std::cerr << "Shader after splitting address loads\n"; @@ -1020,10 +1019,8 @@ r600_shader_from_nir(struct r600_context *rctx, /* We already schedule the code with this in mind, no need to handle this * in the backend assembler */ - if (!r600::sfn_log.has_debug_flag(r600::SfnLog::noaddrsplit)) { - pipeshader->shader.bc.ar_handling = AR_HANDLE_NORMAL; - pipeshader->shader.bc.r6xx_nop_after_rel_dst = 0; - } + pipeshader->shader.bc.ar_handling = AR_HANDLE_NORMAL; + pipeshader->shader.bc.r6xx_nop_after_rel_dst = 0; r600::sfn_log << r600::SfnLog::shader_info << "pipeshader->shader.processor_type = " << pipeshader->shader.processor_type << "\n"; -- 2.7.4