summaryrefslogtreecommitdiff
path: root/src/video_core/shader/decode
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-05-15 02:52:35 -0300
committerGravatar ReinUsesLisp2020-05-27 00:19:45 -0300
commit32e6727daecab60d368d14619c1e04d0d7e60008 (patch)
tree427eade0b7069869011365137de2c87bc15df7e0 /src/video_core/shader/decode
parentMerge pull request #3981 from ReinUsesLisp/bar (diff)
downloadyuzu-32e6727daecab60d368d14619c1e04d0d7e60008.tar.gz
yuzu-32e6727daecab60d368d14619c1e04d0d7e60008.tar.xz
yuzu-32e6727daecab60d368d14619c1e04d0d7e60008.zip
shader/other: Implement MEMBAR.CTS
This silences an assertion we were hitting and uses workgroup memory barriers when the game requests it.
Diffstat (limited to 'src/video_core/shader/decode')
-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) {
299 break; 299 break;
300 } 300 }
301 case OpCode::Id::MEMBAR: { 301 case OpCode::Id::MEMBAR: {
302 UNIMPLEMENTED_IF(instr.membar.type != Tegra::Shader::MembarType::GL);
303 UNIMPLEMENTED_IF(instr.membar.unknown != Tegra::Shader::MembarUnknown::Default); 302 UNIMPLEMENTED_IF(instr.membar.unknown != Tegra::Shader::MembarUnknown::Default);
304 bb.push_back(Operation(OperationCode::MemoryBarrierGL)); 303 const OperationCode type = [instr] {
304 switch (instr.membar.type) {
305 case Tegra::Shader::MembarType::CTA:
306 return OperationCode::MemoryBarrierGroup;
307 case Tegra::Shader::MembarType::GL:
308 return OperationCode::MemoryBarrierGlobal;
309 default:
310 UNIMPLEMENTED_MSG("MEMBAR type={}", static_cast<int>(instr.membar.type.Value()));
311 return OperationCode::MemoryBarrierGlobal;
312 }
313 }();
314 bb.push_back(Operation(type));
305 break; 315 break;
306 } 316 }
307 case OpCode::Id::DEPBAR: { 317 case OpCode::Id::DEPBAR: {