mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-01 08:22:53 +00:00
shader/memory: Implement non-addition operations in RED
Trivially implement these instructions. They are used in Astral Chain.
This commit is contained in:
parent
cf4ee279c6
commit
103809a0ca
|
@ -387,7 +387,6 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) {
|
||||||
}
|
}
|
||||||
case OpCode::Id::RED: {
|
case OpCode::Id::RED: {
|
||||||
UNIMPLEMENTED_IF_MSG(instr.red.type != GlobalAtomicType::U32);
|
UNIMPLEMENTED_IF_MSG(instr.red.type != GlobalAtomicType::U32);
|
||||||
UNIMPLEMENTED_IF_MSG(instr.red.operation != AtomicOp::Add);
|
|
||||||
const auto [real_address, base_address, descriptor] =
|
const auto [real_address, base_address, descriptor] =
|
||||||
TrackGlobalMemory(bb, instr, true, true);
|
TrackGlobalMemory(bb, instr, true, true);
|
||||||
if (!real_address || !base_address) {
|
if (!real_address || !base_address) {
|
||||||
|
@ -396,7 +395,7 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) {
|
||||||
}
|
}
|
||||||
Node gmem = MakeNode<GmemNode>(real_address, base_address, descriptor);
|
Node gmem = MakeNode<GmemNode>(real_address, base_address, descriptor);
|
||||||
Node value = GetRegister(instr.gpr0);
|
Node value = GetRegister(instr.gpr0);
|
||||||
bb.push_back(Operation(OperationCode::ReduceIAdd, move(gmem), move(value)));
|
bb.push_back(Operation(GetAtomOperation(instr.red.operation), move(gmem), move(value)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OpCode::Id::ATOM: {
|
case OpCode::Id::ATOM: {
|
||||||
|
|
Loading…
Reference in a new issue