r600/sfn: ACK all image stores, also at end of loop

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18343>
This commit is contained in:
Gert Wollny 2022-08-31 10:24:00 +02:00 committed by Marge Bot
parent ed294e0863
commit 7d96e153a9
2 changed files with 7 additions and 3 deletions

View file

@ -754,7 +754,7 @@ void AssamblerVisitor::visit(const RatInstr& instr)
struct r600_bytecode_gds gds;
/* The instruction writes to the retuen buffer loaction, and
* the value will actually be read bach, so make sure all previous writes
* the value will actually be read back, so make sure all previous writes
* have been finished */
if (m_ack_suggested /*&& instr.has_instr_flag(Instr::ack_rat_return_write)*/)
emit_wait_ack();
@ -1088,6 +1088,11 @@ void AssamblerVisitor::emit_loop_begin(bool vpm)
void AssamblerVisitor::emit_loop_end()
{
if (m_ack_suggested) {
emit_wait_ack();
m_ack_suggested = false;
}
r600_bytecode_add_cfinst(m_bc, CF_OP_LOOP_END);
m_callstack.pop(FC_LOOP);
assert(m_loop_nesting);

View file

@ -700,8 +700,7 @@ bool RatInstr::emit_image_store(nir_intrinsic_instr *intrin, Shader& shader)
auto store = new RatInstr(op, RatInstr::STORE_TYPED, value, coord, imageid,
image_offset, 1, 0xf, 0);
if (nir_intrinsic_has_access(intrin) & ACCESS_COHERENT)
store->set_ack();
store->set_ack();
shader.emit_instruction(store);
return true;
}