Module: Mesa Branch: staging/22.2 Commit: 34e6c8f1569228c4e7ed7f585db7505d992755a2 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=34e6c8f1569228c4e7ed7f585db7505d992755a2
Author: Gert Wollny <[email protected]> Date: Tue Aug 23 15:03:48 2022 +0200 r600/sfn: Don't tag mem-ring and stream instructions as exports Export instructions allow burst writes, so it makes send to try to allocate consecutive registers, but for ring writes we don't schedule the outputs correctly to exploit this, so for now don't mark these instructions as export to let the RA restart picking colors. When the scheduler starts to emit the ring writes in the right order to allow for bust writes we might revisit this. This fixes [email protected]@execution@variable-indexing@gs-output-array-vec4-index-wr Fixes: 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6 r600/sfn: rewrite NIR backend Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6975 Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Filip Gawin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18212> (cherry picked from commit fd71cd0b6a068ce4f0187b26d4527c3e1b6dee86) --- .pick_status.json | 2 +- src/gallium/drivers/r600/sfn/sfn_liverangeevaluator.cpp | 4 ++-- src/gallium/drivers/r600/sfn/sfn_scheduler.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 283716b00ee..dbc9d0b131d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2911,7 +2911,7 @@ "description": "r600/sfn: Don't tag mem-ring and stream instructions as exports", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "79ca456b4837b3bc21cf9ef3c03c505c4b4909f6" }, diff --git a/src/gallium/drivers/r600/sfn/sfn_liverangeevaluator.cpp b/src/gallium/drivers/r600/sfn/sfn_liverangeevaluator.cpp index cd8b113bd53..277e1e392c3 100644 --- a/src/gallium/drivers/r600/sfn/sfn_liverangeevaluator.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_liverangeevaluator.cpp @@ -308,14 +308,14 @@ void LiveRangeInstrVisitor::visit(StreamOutInstr *instr) { sfn_log << SfnLog::merge << "Visit " << *instr << "\n"; auto src = instr->value(); - record_read(src, LiveRangeEntry::use_export); + record_read(src, LiveRangeEntry::use_unspecified); } void LiveRangeInstrVisitor::visit(MemRingOutInstr *instr) { sfn_log << SfnLog::merge << "Visit " << *instr << "\n"; auto src = instr->value(); - record_read(src, LiveRangeEntry::use_export); + record_read(src, LiveRangeEntry::use_unspecified); auto idx = instr->export_index(); if (idx && idx->as_register()) diff --git a/src/gallium/drivers/r600/sfn/sfn_scheduler.cpp b/src/gallium/drivers/r600/sfn/sfn_scheduler.cpp index 6c95c778695..a8c0d3665b4 100644 --- a/src/gallium/drivers/r600/sfn/sfn_scheduler.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_scheduler.cpp @@ -329,7 +329,7 @@ void BlockSheduler::schedule_block(Block& in_block, Shader::ShaderBlocks& out_bl if (!m_current_block->lds_group_active()) { if (last_shed != sched_free && memops_ready.size() > 8) current_shed = sched_free; - else if (mem_ring_writes_ready.size() > 5) + else if (mem_ring_writes_ready.size() > 15) current_shed = sched_mem_ring; else if (rat_instr_ready.size() > 3) current_shed = sched_rat;
