DS_XCHG_RET and LDS_CMP_XCHG_RET don't have a version that doesn't return
a value in the LDS red queue. so we have to read the value from the queue
and discard it.
Fixes:
79ca456b (r600/sfn: rewrite NIR backend)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23518>
AluInstr::last_write);
instr->add_required_instr(last_lds_instr);
instr->set_blockid(block_id(), index());
+ instr->set_always_keep();
out_block.push_back(instr);
last_lds_instr = instr;
}
auto op = lds_op_from_intrinsic(nir_intrinsic_atomic_op(instr), uses_retval);
+ /* For these two instructions we don't have opcodes that don't read back
+ * the result, so we have to add a dummy-readback to remove the the return
+ * value from read queue. */
+ if (!uses_retval &&
+ (op == LDS_XCHG_RET || op == LDS_CMP_XCHG_RET)) {
+ dest_value = vf.dest(instr->dest, 0, pin_free);
+ }
+
auto address = vf.src(instr->src[0], 0);
AluInstr::SrcValues src;