diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-06 07:24:47 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-06 07:24:47 +0200 |
commit | 3185245845f7487c3b832035b0c19fdc4f1a8262 (patch) | |
tree | c002fb721c5db8fc5f035bbf218e423b8d982f85 /src/video_core/shader/decode | |
parent | shader/memory: Add "using std::move" (diff) | |
download | yuzu-3185245845f7487c3b832035b0c19fdc4f1a8262.tar yuzu-3185245845f7487c3b832035b0c19fdc4f1a8262.tar.gz yuzu-3185245845f7487c3b832035b0c19fdc4f1a8262.tar.bz2 yuzu-3185245845f7487c3b832035b0c19fdc4f1a8262.tar.lz yuzu-3185245845f7487c3b832035b0c19fdc4f1a8262.tar.xz yuzu-3185245845f7487c3b832035b0c19fdc4f1a8262.tar.zst yuzu-3185245845f7487c3b832035b0c19fdc4f1a8262.zip |
Diffstat (limited to 'src/video_core/shader/decode')
-rw-r--r-- | src/video_core/shader/decode/memory.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/video_core/shader/decode/memory.cpp b/src/video_core/shader/decode/memory.cpp index 1a93540fe..8112ead3e 100644 --- a/src/video_core/shader/decode/memory.cpp +++ b/src/video_core/shader/decode/memory.cpp @@ -378,13 +378,27 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) { if (IsUnaligned(type)) { const u32 mask = GetUnalignedMask(type); - value = InsertUnaligned(gmem, std::move(value), real_address, mask, size); + value = InsertUnaligned(gmem, move(value), real_address, mask, size); } bb.push_back(Operation(OperationCode::Assign, gmem, value)); } break; } + case OpCode::Id::RED: { + UNIMPLEMENTED_IF_MSG(instr.red.type != GlobalAtomicType::U32); + UNIMPLEMENTED_IF_MSG(instr.red.operation != AtomicOp::Add); + const auto [real_address, base_address, descriptor] = + TrackGlobalMemory(bb, instr, true, true); + if (!real_address || !base_address) { + // Tracking failed, skip atomic. + break; + } + Node gmem = MakeNode<GmemNode>(real_address, base_address, descriptor); + Node value = GetRegister(instr.gpr0); + bb.push_back(Operation(OperationCode::ReduceIAdd, move(gmem), move(value))); + break; + } case OpCode::Id::ATOM: { UNIMPLEMENTED_IF_MSG(instr.atom.operation == AtomicOp::Inc || instr.atom.operation == AtomicOp::Dec || |