From 259da93567a33ce50d6dcd4e73d89adc7ceaf9ea Mon Sep 17 00:00:00 2001 From: FernandoS27 Date: Mon, 22 Oct 2018 20:17:04 -0400 Subject: Added Saturation to FMUL32I --- src/video_core/engines/shader_bytecode.h | 4 ++++ src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') 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 @@ -563,6 +563,10 @@ union Instruction { BitField<48, 1, u64> negate_b; } 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 b0eb879cc..767a16c25 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -1459,9 +1459,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: { -- cgit v1.2.3