From 2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 26 Dec 2018 02:58:47 -0300 Subject: shader_decode: Use BitfieldExtract instead of shift + and --- 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 ecd27db07..60b11df51 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -985,6 +985,11 @@ private: Type::Int); } + template + std::string BitfieldExtract(Operation operation) { + return GenerateTernary(operation, "bitfieldExtract", type, type, Type::Int, Type::Int); + } + template std::string BitCount(Operation operation) { return GenerateUnary(operation, "bitCount", type, type, false); @@ -1369,6 +1374,7 @@ private: &GLSLDecompiler::BitwiseXor, &GLSLDecompiler::BitwiseNot, &GLSLDecompiler::BitfieldInsert, + &GLSLDecompiler::BitfieldExtract, &GLSLDecompiler::BitCount, &GLSLDecompiler::Add, @@ -1386,6 +1392,7 @@ private: &GLSLDecompiler::BitwiseXor, &GLSLDecompiler::BitwiseNot, &GLSLDecompiler::BitfieldInsert, + &GLSLDecompiler::BitfieldExtract, &GLSLDecompiler::BitCount, &GLSLDecompiler::Add, -- cgit v1.2.3