summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-06-04 18:57:47 +0200
committerSubv <subv2112@gmail.com>2018-06-04 23:41:27 +0200
commitf6679ce422ad825113b40e416452c9c43be3b73e (patch)
tree0795cfdd30c2574df98e7d9c4bc9fe7a272e840a
parentMerge pull request #499 from bunnei/am-stuff (diff)
downloadyuzu-f6679ce422ad825113b40e416452c9c43be3b73e.tar
yuzu-f6679ce422ad825113b40e416452c9c43be3b73e.tar.gz
yuzu-f6679ce422ad825113b40e416452c9c43be3b73e.tar.bz2
yuzu-f6679ce422ad825113b40e416452c9c43be3b73e.tar.lz
yuzu-f6679ce422ad825113b40e416452c9c43be3b73e.tar.xz
yuzu-f6679ce422ad825113b40e416452c9c43be3b73e.tar.zst
yuzu-f6679ce422ad825113b40e416452c9c43be3b73e.zip
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index bb5209a7e..ffb89e4f4 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -849,8 +849,7 @@ private:
ASSERT_MSG(!instr.conversion.saturate_a, "Unimplemented");
switch (opcode->GetId()) {
- case OpCode::Id::I2I_R:
- case OpCode::Id::I2F_R: {
+ case OpCode::Id::I2I_R: {
ASSERT_MSG(!instr.conversion.selector, "Unimplemented");
std::string op_a =
@@ -863,6 +862,17 @@ private:
regs.SetRegisterToInteger(instr.gpr0, instr.conversion.is_signed, 0, op_a, 1, 1);
break;
}
+ case OpCode::Id::I2F_R: {
+ std::string op_a =
+ regs.GetRegisterAsInteger(instr.gpr20, 0, instr.conversion.is_signed);
+
+ if (instr.conversion.abs_a) {
+ op_a = "abs(" + op_a + ')';
+ }
+
+ regs.SetRegisterToFloat(instr.gpr0, 0, op_a, 1, 1);
+ break;
+ }
case OpCode::Id::F2F_R: {
std::string op_a = regs.GetRegisterAsFloat(instr.gpr20);