aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-12-26 02:58:47 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-15 17:54:53 -0300
commit2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e (patch)
tree3faa264db225f2ae09ccf417fd962eddb40c2235 /src/video_core/renderer_opengl
parent52223313b10af4c76b516d6ead247a1a201a71d8 (diff)
shader_decode: Use BitfieldExtract instead of shift + and
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp7
1 files changed, 7 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 ecd27db07..60b11df51 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -986,6 +986,11 @@ private:
}
template <Type type>
+ std::string BitfieldExtract(Operation operation) {
+ return GenerateTernary(operation, "bitfieldExtract", type, type, Type::Int, Type::Int);
+ }
+
+ template <Type type>
std::string BitCount(Operation operation) {
return GenerateUnary(operation, "bitCount", type, type, false);
}
@@ -1369,6 +1374,7 @@ private:
&GLSLDecompiler::BitwiseXor<Type::Int>,
&GLSLDecompiler::BitwiseNot<Type::Int>,
&GLSLDecompiler::BitfieldInsert<Type::Int>,
+ &GLSLDecompiler::BitfieldExtract<Type::Int>,
&GLSLDecompiler::BitCount<Type::Int>,
&GLSLDecompiler::Add<Type::Uint>,
@@ -1386,6 +1392,7 @@ private:
&GLSLDecompiler::BitwiseXor<Type::Uint>,
&GLSLDecompiler::BitwiseNot<Type::Uint>,
&GLSLDecompiler::BitfieldInsert<Type::Uint>,
+ &GLSLDecompiler::BitfieldExtract<Type::Uint>,
&GLSLDecompiler::BitCount<Type::Uint>,
&GLSLDecompiler::Add<Type::HalfFloat>,