From f3d1b370aa0fd614cf28f8a609b70906d40da751 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 12 Nov 2019 10:07:22 -0400 Subject: Shader_IR: Implement FLO instruction. --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 7 +++++++ 1 file changed, 7 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 e56ed51de..b87ee2ae8 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -1472,6 +1472,11 @@ private: return GenerateUnary(operation, "bitCount", type, type); } + template + Expression BitMSB(Operation operation) { + return GenerateUnary(operation, "findMSB", type, type); + } + Expression HNegate(Operation operation) { const auto GetNegate = [&](std::size_t index) { return VisitOperand(operation, index).AsBool() + " ? -1 : 1"; @@ -2043,6 +2048,7 @@ private: &GLSLDecompiler::BitfieldInsert, &GLSLDecompiler::BitfieldExtract, &GLSLDecompiler::BitCount, + &GLSLDecompiler::BitMSB, &GLSLDecompiler::Add, &GLSLDecompiler::Mul, @@ -2061,6 +2067,7 @@ private: &GLSLDecompiler::BitfieldInsert, &GLSLDecompiler::BitfieldExtract, &GLSLDecompiler::BitCount, + &GLSLDecompiler::BitMSB, &GLSLDecompiler::Add, &GLSLDecompiler::Mul, -- cgit v1.2.3