From 027f443e699652fc30a849efaf8c12725a7b5729 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sun, 23 Dec 2018 01:33:47 -0300 Subject: shader_decode: Implement POPC --- src/video_core/shader/glsl_decompiler.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/video_core/shader/glsl_decompiler.cpp') 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 + 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(operation[index])) { @@ -1273,6 +1278,7 @@ private: &BitwiseXor, &BitwiseNot, &BitfieldInsert, + &BitCount, &Add, &Mul, @@ -1289,6 +1295,7 @@ private: &BitwiseXor, &BitwiseNot, &BitfieldInsert, + &BitCount, &Add, &Mul, -- cgit v1.2.3