summaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-04-15 15:03:49 -0400
committerGravatar GitHub2020-04-15 15:03:49 -0400
commite33196d4e7687dd29636decd4b52e01b10fe8984 (patch)
treeb20b84dc47b9ef48c8701951ead117f52252e6e5 /src/video_core/renderer_opengl
parentMerge pull request #3670 from lioncash/reorder (diff)
parentshader/memory: Implement RED.E.ADD (diff)
downloadyuzu-e33196d4e7687dd29636decd4b52e01b10fe8984.tar.gz
yuzu-e33196d4e7687dd29636decd4b52e01b10fe8984.tar.xz
yuzu-e33196d4e7687dd29636decd4b52e01b10fe8984.zip
Merge pull request #3612 from ReinUsesLisp/red
shader/memory: Implement RED.E.ADD and minor changes to ATOM
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 59bbd1211..b1804e9ea 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -2119,8 +2119,14 @@ private:
2119 return {}; 2119 return {};
2120 } 2120 }
2121 return {fmt::format("atomic{}({}, {})", opname, Visit(operation[0]).GetCode(), 2121 return {fmt::format("atomic{}({}, {})", opname, Visit(operation[0]).GetCode(),
2122 Visit(operation[1]).As(type)), 2122 Visit(operation[1]).AsUint()),
2123 type}; 2123 Type::Uint};
2124 }
2125
2126 template <const std::string_view& opname, Type type>
2127 Expression Reduce(Operation operation) {
2128 code.AddLine("{};", Atomic<opname, type>(operation).GetCode());
2129 return {};
2124 } 2130 }
2125 2131
2126 Expression Branch(Operation operation) { 2132 Expression Branch(Operation operation) {
@@ -2479,6 +2485,20 @@ private:
2479 &GLSLDecompiler::Atomic<Func::Or, Type::Int>, 2485 &GLSLDecompiler::Atomic<Func::Or, Type::Int>,
2480 &GLSLDecompiler::Atomic<Func::Xor, Type::Int>, 2486 &GLSLDecompiler::Atomic<Func::Xor, Type::Int>,
2481 2487
2488 &GLSLDecompiler::Reduce<Func::Add, Type::Uint>,
2489 &GLSLDecompiler::Reduce<Func::Min, Type::Uint>,
2490 &GLSLDecompiler::Reduce<Func::Max, Type::Uint>,
2491 &GLSLDecompiler::Reduce<Func::And, Type::Uint>,
2492 &GLSLDecompiler::Reduce<Func::Or, Type::Uint>,
2493 &GLSLDecompiler::Reduce<Func::Xor, Type::Uint>,
2494
2495 &GLSLDecompiler::Reduce<Func::Add, Type::Int>,
2496 &GLSLDecompiler::Reduce<Func::Min, Type::Int>,
2497 &GLSLDecompiler::Reduce<Func::Max, Type::Int>,
2498 &GLSLDecompiler::Reduce<Func::And, Type::Int>,
2499 &GLSLDecompiler::Reduce<Func::Or, Type::Int>,
2500 &GLSLDecompiler::Reduce<Func::Xor, Type::Int>,
2501
2482 &GLSLDecompiler::Branch, 2502 &GLSLDecompiler::Branch,
2483 &GLSLDecompiler::BranchIndirect, 2503 &GLSLDecompiler::BranchIndirect,
2484 &GLSLDecompiler::PushFlowStack, 2504 &GLSLDecompiler::PushFlowStack,