summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorLaku <Lakumakkara@users.noreply.github.com>2018-08-31 03:32:58 +0200
committerbunnei <bunneidev@gmail.com>2018-08-31 03:32:58 +0200
commit915ab81ec203d40e6f67d3cfa6e2e26599bec570 (patch)
tree1e74c1c52f86e89c3ddc9e166034f5b96b194760 /src/video_core/renderer_opengl
parentMerge pull request #1200 from bunnei/improve-ipa (diff)
downloadyuzu-915ab81ec203d40e6f67d3cfa6e2e26599bec570.tar
yuzu-915ab81ec203d40e6f67d3cfa6e2e26599bec570.tar.gz
yuzu-915ab81ec203d40e6f67d3cfa6e2e26599bec570.tar.bz2
yuzu-915ab81ec203d40e6f67d3cfa6e2e26599bec570.tar.lz
yuzu-915ab81ec203d40e6f67d3cfa6e2e26599bec570.tar.xz
yuzu-915ab81ec203d40e6f67d3cfa6e2e26599bec570.tar.zst
yuzu-915ab81ec203d40e6f67d3cfa6e2e26599bec570.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp9
1 files changed, 9 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 7b6eb25a4..842bfa0b7 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -1363,6 +1363,15 @@ private:
"((" + op_a + " << " + shift + ") + " + op_b + ')', 1, 1);
break;
}
+ case OpCode::Id::POPC_C:
+ case OpCode::Id::POPC_R:
+ case OpCode::Id::POPC_IMM: {
+ if (instr.popc.invert) {
+ op_b = "~(" + op_b + ')';
+ }
+ regs.SetRegisterToInteger(instr.gpr0, true, 0, "bitCount(" + op_b + ')', 1, 1);
+ break;
+ }
case OpCode::Id::SEL_C:
case OpCode::Id::SEL_R:
case OpCode::Id::SEL_IMM: {