summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-10-23 05:58:09 +0200
committerGitHub <noreply@github.com>2018-10-23 05:58:09 +0200
commit496d155d7b15d4cb79848e49806df62c6a14fd0e (patch)
treea823283046a4e75f97dc887205a90ad79e3051a5
parentMerge pull request #1543 from lioncash/target (diff)
parentAdded Saturation to FMUL32I (diff)
downloadyuzu-496d155d7b15d4cb79848e49806df62c6a14fd0e.tar
yuzu-496d155d7b15d4cb79848e49806df62c6a14fd0e.tar.gz
yuzu-496d155d7b15d4cb79848e49806df62c6a14fd0e.tar.bz2
yuzu-496d155d7b15d4cb79848e49806df62c6a14fd0e.tar.lz
yuzu-496d155d7b15d4cb79848e49806df62c6a14fd0e.tar.xz
yuzu-496d155d7b15d4cb79848e49806df62c6a14fd0e.tar.zst
yuzu-496d155d7b15d4cb79848e49806df62c6a14fd0e.zip
-rw-r--r--src/video_core/engines/shader_bytecode.h4
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp7
2 files changed, 8 insertions, 3 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index 67501cf0a..d3095089c 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -564,6 +564,10 @@ union Instruction {
} fmul;
union {
+ BitField<55, 1, u64> saturate;
+ } fmul32;
+
+ union {
BitField<48, 1, u64> is_signed;
} shift;
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 09db58ab6..a3daef014 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -1460,9 +1460,10 @@ private:
break;
}
case OpCode::Id::FMUL32_IMM: {
- regs.SetRegisterToFloat(
- instr.gpr0, 0,
- regs.GetRegisterAsFloat(instr.gpr8) + " * " + GetImmediate32(instr), 1, 1);
+ regs.SetRegisterToFloat(instr.gpr0, 0,
+ regs.GetRegisterAsFloat(instr.gpr8) + " * " +
+ GetImmediate32(instr),
+ 1, 1, instr.fmul32.saturate);
break;
}
case OpCode::Id::FADD32I: {