mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 15:32:52 +00:00
shader_recompiler: Fix frexp exponent type.
This commit is contained in:
parent
ec515ad113
commit
2d88468f14
@ -267,12 +267,12 @@ Id EmitFPFrexpSig64(EmitContext& ctx, Id value) {
|
|||||||
|
|
||||||
Id EmitFPFrexpExp32(EmitContext& ctx, Id value) {
|
Id EmitFPFrexpExp32(EmitContext& ctx, Id value) {
|
||||||
const auto frexp = ctx.OpFrexpStruct(ctx.frexp_result_f32, value);
|
const auto frexp = ctx.OpFrexpStruct(ctx.frexp_result_f32, value);
|
||||||
return ctx.OpCompositeExtract(ctx.U32[1], frexp, 1);
|
return ctx.OpBitcast(ctx.U32[1], ctx.OpCompositeExtract(ctx.S32[1], frexp, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
Id EmitFPFrexpExp64(EmitContext& ctx, Id value) {
|
Id EmitFPFrexpExp64(EmitContext& ctx, Id value) {
|
||||||
const auto frexp = ctx.OpFrexpStruct(ctx.frexp_result_f64, value);
|
const auto frexp = ctx.OpFrexpStruct(ctx.frexp_result_f64, value);
|
||||||
return ctx.OpCompositeExtract(ctx.U32[1], frexp, 1);
|
return ctx.OpBitcast(ctx.U32[1], ctx.OpCompositeExtract(ctx.S32[1], frexp, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
Id EmitFPOrdEqual16(EmitContext& ctx, Id lhs, Id rhs) {
|
Id EmitFPOrdEqual16(EmitContext& ctx, Id lhs, Id rhs) {
|
||||||
|
@ -153,9 +153,9 @@ void EmitContext::DefineArithmeticTypes() {
|
|||||||
|
|
||||||
full_result_i32x2 = Name(TypeStruct(S32[1], S32[1]), "full_result_i32x2");
|
full_result_i32x2 = Name(TypeStruct(S32[1], S32[1]), "full_result_i32x2");
|
||||||
full_result_u32x2 = Name(TypeStruct(U32[1], U32[1]), "full_result_u32x2");
|
full_result_u32x2 = Name(TypeStruct(U32[1], U32[1]), "full_result_u32x2");
|
||||||
frexp_result_f32 = Name(TypeStruct(F32[1], U32[1]), "frexp_result_f32");
|
frexp_result_f32 = Name(TypeStruct(F32[1], S32[1]), "frexp_result_f32");
|
||||||
if (info.uses_fp64) {
|
if (info.uses_fp64) {
|
||||||
frexp_result_f64 = Name(TypeStruct(F64[1], U32[1]), "frexp_result_f64");
|
frexp_result_f64 = Name(TypeStruct(F64[1], S32[1]), "frexp_result_f64");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user