summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-04-03 05:17:08 -0300
committerGravatar ameerj2021-07-22 21:51:26 -0400
commitc4aab5c40ec1347da9811169bbc3dfb23632ab98 (patch)
tree3324fed6e7e209962f8112efa0fe642267676bca /src/shader_recompiler/frontend
parentshader: Fix FADD32I (diff)
downloadyuzu-c4aab5c40ec1347da9811169bbc3dfb23632ab98.tar.gz
yuzu-c4aab5c40ec1347da9811169bbc3dfb23632ab98.tar.xz
yuzu-c4aab5c40ec1347da9811169bbc3dfb23632ab98.zip
shader: Fix fp16 merge when using native fp16
Diffstat (limited to 'src/shader_recompiler/frontend')
-rw-r--r--src/shader_recompiler/frontend/maxwell/translate/impl/half_floating_point_helper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/half_floating_point_helper.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/half_floating_point_helper.cpp
index d0c6ba1aa..0dbeb7f56 100644
--- a/src/shader_recompiler/frontend/maxwell/translate/impl/half_floating_point_helper.cpp
+++ b/src/shader_recompiler/frontend/maxwell/translate/impl/half_floating_point_helper.cpp
@@ -51,9 +51,9 @@ IR::U32 MergeResult(IR::IREmitter& ir, IR::Reg dest, const IR::F16& lhs, const I
51 case Merge::MRG_H0: 51 case Merge::MRG_H0:
52 case Merge::MRG_H1: { 52 case Merge::MRG_H1: {
53 const IR::Value vector{ir.UnpackFloat2x16(ir.GetReg(dest))}; 53 const IR::Value vector{ir.UnpackFloat2x16(ir.GetReg(dest))};
54 const bool h0{merge == Merge::MRG_H0}; 54 const bool is_h0{merge == Merge::MRG_H0};
55 const IR::F16& insert{h0 ? lhs : rhs}; 55 const IR::F16 insert{ir.FPConvert(16, is_h0 ? lhs : rhs)};
56 return ir.PackFloat2x16(ir.CompositeInsert(vector, insert, h0 ? 0 : 1)); 56 return ir.PackFloat2x16(ir.CompositeInsert(vector, insert, is_h0 ? 0 : 1));
57 } 57 }
58 } 58 }
59 throw InvalidArgument("Invalid merge {}", merge); 59 throw InvalidArgument("Invalid merge {}", merge);