mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-26 07:11:22 -08:00
spirv/convert: Catch more broken signed operations on Nvidia OpenGL
BitCast U32 to S32 before converting to float on drivers with broken signed operations.
This commit is contained in:
parent
cd8427367e
commit
8554a644df
@ -205,6 +205,9 @@ Id EmitConvertF32S16(EmitContext& ctx, Id value) {
|
||||
}
|
||||
|
||||
Id EmitConvertF32S32(EmitContext& ctx, Id value) {
|
||||
if (ctx.profile.has_broken_signed_operations) {
|
||||
value = ctx.OpBitcast(ctx.S32[1], value);
|
||||
}
|
||||
return ctx.OpConvertSToF(ctx.F32[1], value);
|
||||
}
|
||||
|
||||
@ -237,6 +240,9 @@ Id EmitConvertF64S16(EmitContext& ctx, Id value) {
|
||||
}
|
||||
|
||||
Id EmitConvertF64S32(EmitContext& ctx, Id value) {
|
||||
if (ctx.profile.has_broken_signed_operations) {
|
||||
value = ctx.OpBitcast(ctx.S32[1], value);
|
||||
}
|
||||
return ctx.OpConvertSToF(ctx.F64[1], value);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user