aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/decode/other.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-05-30 11:51:42 -0400
committerGitHub <noreply@github.com>2020-05-30 11:51:42 -0400
commit058ec22787a6d3e41c3dfabd2060a1b723594374 (patch)
tree0c9498d5e104ce52c2e50f1a0020a97516924d06 /src/video_core/shader/decode/other.cpp
parent9d9ffe0f9461ffa3b2e183b17a08953ada0ee91b (diff)
parent32e6727daecab60d368d14619c1e04d0d7e60008 (diff)
Merge pull request #3982 from ReinUsesLisp/membar-cts
shader/other: Implement MEMBAR.CTS
Diffstat (limited to 'src/video_core/shader/decode/other.cpp')
-rw-r--r--src/video_core/shader/decode/other.cpp14
1 files changed, 12 insertions, 2 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: {