diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-15 07:52:35 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-27 05:19:45 +0200 |
commit | 32e6727daecab60d368d14619c1e04d0d7e60008 (patch) | |
tree | 427eade0b7069869011365137de2c87bc15df7e0 /src/video_core/shader | |
parent | Merge pull request #3981 from ReinUsesLisp/bar (diff) | |
download | yuzu-32e6727daecab60d368d14619c1e04d0d7e60008.tar yuzu-32e6727daecab60d368d14619c1e04d0d7e60008.tar.gz yuzu-32e6727daecab60d368d14619c1e04d0d7e60008.tar.bz2 yuzu-32e6727daecab60d368d14619c1e04d0d7e60008.tar.lz yuzu-32e6727daecab60d368d14619c1e04d0d7e60008.tar.xz yuzu-32e6727daecab60d368d14619c1e04d0d7e60008.tar.zst yuzu-32e6727daecab60d368d14619c1e04d0d7e60008.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/decode/other.cpp | 14 | ||||
-rw-r--r-- | src/video_core/shader/node.h | 5 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/video_core/shader/decode/other.cpp b/src/video_core/shader/decode/other.cpp index 694b325e1..d00e10913 100644 --- a/src/video_core/shader/decode/other.cpp +++ b/src/video_core/shader/decode/other.cpp @@ -299,9 +299,19 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) { break; } case OpCode::Id::MEMBAR: { - UNIMPLEMENTED_IF(instr.membar.type != Tegra::Shader::MembarType::GL); UNIMPLEMENTED_IF(instr.membar.unknown != Tegra::Shader::MembarUnknown::Default); - bb.push_back(Operation(OperationCode::MemoryBarrierGL)); + const OperationCode type = [instr] { + switch (instr.membar.type) { + case Tegra::Shader::MembarType::CTA: + return OperationCode::MemoryBarrierGroup; + case Tegra::Shader::MembarType::GL: + return OperationCode::MemoryBarrierGlobal; + default: + UNIMPLEMENTED_MSG("MEMBAR type={}", static_cast<int>(instr.membar.type.Value())); + return OperationCode::MemoryBarrierGlobal; + } + }(); + bb.push_back(Operation(type)); break; } case OpCode::Id::DEPBAR: { diff --git a/src/video_core/shader/node.h b/src/video_core/shader/node.h index c06512413..c5e5165ff 100644 --- a/src/video_core/shader/node.h +++ b/src/video_core/shader/node.h @@ -233,8 +233,9 @@ enum class OperationCode { ThreadLtMask, /// () -> uint ShuffleIndexed, /// (uint value, uint index) -> uint - Barrier, /// () -> void - MemoryBarrierGL, /// () -> void + Barrier, /// () -> void + MemoryBarrierGroup, /// () -> void + MemoryBarrierGlobal, /// () -> void Amount, }; |