diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-11 07:11:59 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:35 +0200 |
commit | d52bacf6f035ddbc4b2333953709cbd3993e4817 (patch) | |
tree | 3390a1bd1ae6ade6d3f5029d5e54223da51eb6b4 /src/shader_recompiler/backend/spirv | |
parent | spirv/convert: Catch more broken signed operations on Nvidia OpenGL (diff) | |
download | yuzu-d52bacf6f035ddbc4b2333953709cbd3993e4817.tar yuzu-d52bacf6f035ddbc4b2333953709cbd3993e4817.tar.gz yuzu-d52bacf6f035ddbc4b2333953709cbd3993e4817.tar.bz2 yuzu-d52bacf6f035ddbc4b2333953709cbd3993e4817.tar.lz yuzu-d52bacf6f035ddbc4b2333953709cbd3993e4817.tar.xz yuzu-d52bacf6f035ddbc4b2333953709cbd3993e4817.tar.zst yuzu-d52bacf6f035ddbc4b2333953709cbd3993e4817.zip |
Diffstat (limited to 'src/shader_recompiler/backend/spirv')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp index 2c4250a0c..fd42b7a16 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp @@ -17,14 +17,14 @@ Id ExtractU16(EmitContext& ctx, Id value) { Id ExtractS16(EmitContext& ctx, Id value) { if (ctx.profile.support_int16) { - return ctx.OpUConvert(ctx.S16, value); + return ctx.OpSConvert(ctx.S16, value); } else { return ctx.OpBitFieldSExtract(ctx.U32[1], value, ctx.u32_zero_value, ctx.Const(16u)); } } Id ExtractU8(EmitContext& ctx, Id value) { - if (ctx.profile.support_int16) { + if (ctx.profile.support_int8) { return ctx.OpUConvert(ctx.U8, value); } else { return ctx.OpBitFieldUExtract(ctx.U32[1], value, ctx.u32_zero_value, ctx.Const(8u)); @@ -42,7 +42,7 @@ Id ExtractS8(EmitContext& ctx, Id value) { Id EmitConvertS16F16(EmitContext& ctx, Id value) { if (ctx.profile.support_int16) { - return ctx.OpUConvert(ctx.U32[1], ctx.OpConvertFToS(ctx.U16, value)); + return ctx.OpSConvert(ctx.U32[1], ctx.OpConvertFToS(ctx.U16, value)); } else { return ExtractS16(ctx, ctx.OpConvertFToS(ctx.U32[1], value)); } @@ -50,7 +50,7 @@ Id EmitConvertS16F16(EmitContext& ctx, Id value) { Id EmitConvertS16F32(EmitContext& ctx, Id value) { if (ctx.profile.support_int16) { - return ctx.OpUConvert(ctx.U32[1], ctx.OpConvertFToS(ctx.U16, value)); + return ctx.OpSConvert(ctx.U32[1], ctx.OpConvertFToS(ctx.U16, value)); } else { return ExtractS16(ctx, ctx.OpConvertFToS(ctx.U32[1], value)); } @@ -58,7 +58,7 @@ Id EmitConvertS16F32(EmitContext& ctx, Id value) { Id EmitConvertS16F64(EmitContext& ctx, Id value) { if (ctx.profile.support_int16) { - return ctx.OpUConvert(ctx.U32[1], ctx.OpConvertFToS(ctx.U16, value)); + return ctx.OpSConvert(ctx.U32[1], ctx.OpConvertFToS(ctx.U16, value)); } else { return ExtractS16(ctx, ctx.OpConvertFToS(ctx.U32[1], value)); } |