yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

shader: Fix fp16 merge when using native fp16

This commit is contained in:
ReinUsesLisp 2021-04-03 05:17:08 -03:00 committed by ameerj
parent ca7ebdc471
commit c4aab5c40e
1 changed files with 3 additions and 3 deletions

View File

@ -51,9 +51,9 @@ IR::U32 MergeResult(IR::IREmitter& ir, IR::Reg dest, const IR::F16& lhs, const I
case Merge::MRG_H0: case Merge::MRG_H0:
case Merge::MRG_H1: { case Merge::MRG_H1: {
const IR::Value vector{ir.UnpackFloat2x16(ir.GetReg(dest))}; const IR::Value vector{ir.UnpackFloat2x16(ir.GetReg(dest))};
const bool h0{merge == Merge::MRG_H0}; const bool is_h0{merge == Merge::MRG_H0};
const IR::F16& insert{h0 ? lhs : rhs}; const IR::F16 insert{ir.FPConvert(16, is_h0 ? lhs : rhs)};
return ir.PackFloat2x16(ir.CompositeInsert(vector, insert, h0 ? 0 : 1)); return ir.PackFloat2x16(ir.CompositeInsert(vector, insert, is_h0 ? 0 : 1));
} }
} }
throw InvalidArgument("Invalid merge {}", merge); throw InvalidArgument("Invalid merge {}", merge);