summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-06-09 06:01:17 +0200
committerbunnei <bunneidev@gmail.com>2018-06-09 06:01:17 +0200
commit5440b9c634555c174a9eaf7fd6d308c4ab2cb3bb (patch)
treeb491f11a8e2ddb023c66b709c2f19c8b38de2c97 /src/video_core/renderer_opengl/gl_shader_decompiler.cpp
parentMerge pull request #505 from janisozaur/ccache-travis (diff)
downloadyuzu-5440b9c634555c174a9eaf7fd6d308c4ab2cb3bb.tar
yuzu-5440b9c634555c174a9eaf7fd6d308c4ab2cb3bb.tar.gz
yuzu-5440b9c634555c174a9eaf7fd6d308c4ab2cb3bb.tar.bz2
yuzu-5440b9c634555c174a9eaf7fd6d308c4ab2cb3bb.tar.lz
yuzu-5440b9c634555c174a9eaf7fd6d308c4ab2cb3bb.tar.xz
yuzu-5440b9c634555c174a9eaf7fd6d308c4ab2cb3bb.tar.zst
yuzu-5440b9c634555c174a9eaf7fd6d308c4ab2cb3bb.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_decompiler.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp13
1 files changed, 13 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 94c6bc4b2..fde19cb6b 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -973,6 +973,19 @@ private:
}
switch (opcode->GetId()) {
+ case OpCode::Id::SHR_C:
+ case OpCode::Id::SHR_R:
+ case OpCode::Id::SHR_IMM: {
+ if (!instr.shift.is_signed) {
+ // Logical shift right
+ op_a = "uint(" + op_a + ')';
+ }
+
+ // Cast to int is superfluous for arithmetic shift, it's only for a logical shift
+ regs.SetRegisterToInteger(instr.gpr0, true, 0, "int(" + op_a + " >> " + op_b + ')',
+ 1, 1);
+ break;
+ }
case OpCode::Id::SHL_C:
case OpCode::Id::SHL_R:
case OpCode::Id::SHL_IMM: