From 552f0ff26713a2fd1fd9207e79574d35fd8d36dd Mon Sep 17 00:00:00 2001 From: Nguyen Dac Nam Date: Fri, 13 Mar 2020 23:07:05 +0700 Subject: gl_decompiler: add atomic op --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 16 ++++++++++++++++ 1 file changed, 16 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 8aa4a7ac9..9121a48bb 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -2307,6 +2307,8 @@ private: ~Func() = delete; static constexpr std::string_view Add = "Add"; + static constexpr std::string_view Min = "Min"; + static constexpr std::string_view Max = "Max"; static constexpr std::string_view And = "And"; static constexpr std::string_view Or = "Or"; static constexpr std::string_view Xor = "Xor"; @@ -2457,7 +2459,21 @@ private: &GLSLDecompiler::AtomicImage, &GLSLDecompiler::AtomicImage, + &GLSLDecompiler::Atomic, &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, + + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, + &GLSLDecompiler::Atomic, &GLSLDecompiler::Branch, &GLSLDecompiler::BranchIndirect, -- cgit v1.2.3 From c2665ec9c232f473ecb9301da7181159505a1c76 Mon Sep 17 00:00:00 2001 From: namkazy Date: Mon, 30 Mar 2020 18:48:22 +0700 Subject: gl_decompiler: min/max op not implement yet --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 4 ++++ 1 file changed, 4 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 9121a48bb..c7d24cf14 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -2114,6 +2114,10 @@ private: template Expression Atomic(Operation operation) { + if ((opname == Func::Min || opname == Func::Max) && type == Type::Int) { + UNIMPLEMENTED_MSG("Unimplemented Min & Max for atomic operations"); + return {}; + } return {fmt::format("atomic{}({}, {})", opname, Visit(operation[0]).GetCode(), Visit(operation[1]).As(type)), type}; -- cgit v1.2.3