mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01: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
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue