r600/sfn: Fix emitting shared atomics with constant sources

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6879>
This commit is contained in:
Gert Wollny 2020-09-23 23:56:35 +02:00 committed by Marge Bot
parent e8c5f8b9d3
commit b2df9c2f88
1 changed files with 4 additions and 8 deletions

View File

@ -1071,14 +1071,10 @@ bool AssemblyFromShaderLegacyImpl::emit_ldsatomic(const LDSAtomicInstruction& in
alu_fetch.op = instr.op();
copy_src(alu_fetch.src[0], instr.address());
auto& src0 = instr.src0();
alu_fetch.src[1].sel = src0.sel();
alu_fetch.src[1].chan = src0.chan();
if (instr.src1()) {
auto& src1 = *instr.src1();
alu_fetch.src[2].sel = src1.sel();
alu_fetch.src[2].chan = src1.chan();
}
copy_src(alu_fetch.src[1], instr.src0());
if (instr.src1())
copy_src(alu_fetch.src[2], *instr.src1());
alu_fetch.last = 1;
int r = r600_bytecode_add_alu(m_bc, &alu_fetch);
if (r)