diff options
author | bunnei <bunneidev@gmail.com> | 2020-04-30 18:56:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 18:56:36 +0200 |
commit | c7b5a87c9038f37e5fec07336de575498a84b534 (patch) | |
tree | aaefec229f8ddcb6744b405757d2559c1dcf0b92 /src/video_core/renderer_opengl | |
parent | Merge pull request #3805 from ReinUsesLisp/preserve-contents (diff) | |
parent | shader/arithmetic_integer: Fix tracking issue in temporary (diff) | |
download | yuzu-c7b5a87c9038f37e5fec07336de575498a84b534.tar yuzu-c7b5a87c9038f37e5fec07336de575498a84b534.tar.gz yuzu-c7b5a87c9038f37e5fec07336de575498a84b534.tar.bz2 yuzu-c7b5a87c9038f37e5fec07336de575498a84b534.tar.lz yuzu-c7b5a87c9038f37e5fec07336de575498a84b534.tar.xz yuzu-c7b5a87c9038f37e5fec07336de575498a84b534.tar.zst yuzu-c7b5a87c9038f37e5fec07336de575498a84b534.zip |
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 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>, |