summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-04-26 02:56:11 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-04-26 03:55:26 +0200
commit255197e64363f9286ed145cafdeb129c85c16621 (patch)
tree976cb93129b86277b8136f21f3c7c2492bb8694d /src/video_core/renderer_opengl/gl_shader_decompiler.cpp
parentdecode/register_set_predicate: Implement CC (diff)
downloadyuzu-255197e64363f9286ed145cafdeb129c85c16621.tar
yuzu-255197e64363f9286ed145cafdeb129c85c16621.tar.gz
yuzu-255197e64363f9286ed145cafdeb129c85c16621.tar.bz2
yuzu-255197e64363f9286ed145cafdeb129c85c16621.tar.lz
yuzu-255197e64363f9286ed145cafdeb129c85c16621.tar.xz
yuzu-255197e64363f9286ed145cafdeb129c85c16621.tar.zst
yuzu-255197e64363f9286ed145cafdeb129c85c16621.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_decompiler.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp10
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 0cd3ad7e1..3803a6f3a 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -1870,6 +1870,14 @@ private:
return GenerateBinaryInfix(operation, ">=", Type::Bool, type, type);
}
+ Expression LogicalAddCarry(Operation operation) {
+ const std::string carry = code.GenerateTemporary();
+ code.AddLine("uint {};", carry);
+ code.AddLine("uaddCarry({}, {}, {});", VisitOperand(operation, 0).AsUint(),
+ VisitOperand(operation, 1).AsUint(), carry);
+ return {fmt::format("({} != 0)", carry), Type::Bool};
+ }
+
Expression LogicalFIsNan(Operation operation) {
return GenerateUnary(operation, "isnan", Type::Bool, Type::Float);
}
@@ -2441,6 +2449,8 @@ private:
&GLSLDecompiler::LogicalNotEqual<Type::Uint>,
&GLSLDecompiler::LogicalGreaterEqual<Type::Uint>,
+ &GLSLDecompiler::LogicalAddCarry,
+
&GLSLDecompiler::Logical2HLessThan<false>,
&GLSLDecompiler::Logical2HEqual<false>,
&GLSLDecompiler::Logical2HLessEqual<false>,