From 63ba41a26d6bfdd30a4d7cd0879003fb4000332b Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Thu, 16 Jan 2020 04:00:52 -0300 Subject: shader/memory: Implement ATOMS.ADD.U32 --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/video_core/renderer_opengl') diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index f9f7a97b5..19751939a 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -1856,6 +1856,16 @@ private: Type::Uint}; } + template + Expression Atomic(Operation operation) { + ASSERT(stage == ShaderType::Compute); + auto& smem = std::get(*operation[0]); + + return {fmt::format("atomic{}(smem[{} >> 2], {})", opname, Visit(smem.GetAddress()).AsInt(), + Visit(operation[1]).As(type)), + type}; + } + Expression Branch(Operation operation) { const auto target = std::get_if(&*operation[0]); UNIMPLEMENTED_IF(!target); @@ -2194,6 +2204,8 @@ private: &GLSLDecompiler::AtomicImage, &GLSLDecompiler::AtomicImage, + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Branch, &GLSLDecompiler::BranchIndirect, &GLSLDecompiler::PushFlowStack, -- cgit v1.2.3