summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp
index fd74e475f..2c4250a0c 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp
@@ -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);
}