summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/glsl_decompiler.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-12-23 05:33:47 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-15 21:54:52 +0100
commit027f443e699652fc30a849efaf8c12725a7b5729 (patch)
tree10f5c18227a20ce4cf9295107ee16e310e0d41da /src/video_core/shader/glsl_decompiler.cpp
parentshader_decode: Implement TLDS (untested) (diff)
downloadyuzu-027f443e699652fc30a849efaf8c12725a7b5729.tar
yuzu-027f443e699652fc30a849efaf8c12725a7b5729.tar.gz
yuzu-027f443e699652fc30a849efaf8c12725a7b5729.tar.bz2
yuzu-027f443e699652fc30a849efaf8c12725a7b5729.tar.lz
yuzu-027f443e699652fc30a849efaf8c12725a7b5729.tar.xz
yuzu-027f443e699652fc30a849efaf8c12725a7b5729.tar.zst
yuzu-027f443e699652fc30a849efaf8c12725a7b5729.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/shader/glsl_decompiler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/shader/glsl_decompiler.cpp b/src/video_core/shader/glsl_decompiler.cpp
index b93ea9ec6..1aff62882 100644
--- a/src/video_core/shader/glsl_decompiler.cpp
+++ b/src/video_core/shader/glsl_decompiler.cpp
@@ -908,6 +908,11 @@ private:
Type::Int);
}
+ template <Type type>
+ std::string BitCount(Operation operation) {
+ return GenerateUnary(operation, "bitCount", type, type, false);
+ }
+
std::string HNegate(Operation operation) {
const auto GetNegate = [&](std::size_t index) -> std::string {
if (const auto pred = std::get_if<PredicateNode>(operation[index])) {
@@ -1273,6 +1278,7 @@ private:
&BitwiseXor<Type::Int>,
&BitwiseNot<Type::Int>,
&BitfieldInsert<Type::Int>,
+ &BitCount<Type::Int>,
&Add<Type::Uint>,
&Mul<Type::Uint>,
@@ -1289,6 +1295,7 @@ private:
&BitwiseXor<Type::Uint>,
&BitwiseNot<Type::Uint>,
&BitfieldInsert<Type::Uint>,
+ &BitCount<Type::Uint>,
&Add<Type::HalfFloat>,
&Mul<Type::HalfFloat>,