diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-15 02:24:42 -0300 |
|---|---|---|
| committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-21 23:20:43 -0300 |
| commit | 5d0986a53be495f2a2158968db1bc0974f0dd0d3 (patch) | |
| tree | 76b89957701a3e8cec21211b0090f8517b9338af /src/video_core/renderer_opengl | |
| parent | cf4ee279c6424ada927f74fcc34e013038af7228 (diff) | |
shader/other: Implement BAR.SYNC 0x0
Trivially implement this particular case of BAR. Unless games use OpenCL
or CUDA barriers, we shouldn't hit any other case here.
Diffstat (limited to 'src/video_core/renderer_opengl')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 960ebf1a1..6804758f7 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -2321,6 +2321,15 @@ private: return {fmt::format("readInvocationARB({}, {})", value, index), Type::Float}; } + Expression Barrier(Operation) { + if (!ir.IsDecompiled()) { + LOG_ERROR(Render_OpenGL, "barrier() used but shader is not decompiled"); + return {}; + } + code.AddLine("barrier();"); + return {}; + } + Expression MemoryBarrierGL(Operation) { code.AddLine("memoryBarrier();"); return {}; @@ -2556,6 +2565,7 @@ private: &GLSLDecompiler::ThreadId, &GLSLDecompiler::ShuffleIndexed, + &GLSLDecompiler::Barrier, &GLSLDecompiler::MemoryBarrierGL, }; static_assert(operation_decompilers.size() == static_cast<std::size_t>(OperationCode::Amount)); |
