diff options
| author | 2023-01-25 22:03:15 -0500 | |
|---|---|---|
| committer | 2023-01-25 22:03:15 -0500 | |
| commit | 93cc6e4d992d60a7e8fe73d9ab062e1187775ec5 (patch) | |
| tree | 335599cbf3f86107b0ceca197237c041c33827f0 /src/shader_recompiler/ir_opt/texture_pass.cpp | |
| parent | Merge pull request #9555 from abouvier/catch2-update (diff) | |
| download | yuzu-93cc6e4d992d60a7e8fe73d9ab062e1187775ec5.tar.gz yuzu-93cc6e4d992d60a7e8fe73d9ab062e1187775ec5.tar.xz yuzu-93cc6e4d992d60a7e8fe73d9ab062e1187775ec5.zip | |
shader_recompiler: Remove S32 IR type
The frontend IR opcodes do not distinguish between signed and unsigned integer types.
Fixes broken shaders when IR validation/graphics debugging is enabled for shaders that used BitCastS32F32
Diffstat (limited to 'src/shader_recompiler/ir_opt/texture_pass.cpp')
| -rw-r--r-- | src/shader_recompiler/ir_opt/texture_pass.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp index f5c86fcb1..7d13c65b3 100644 --- a/src/shader_recompiler/ir_opt/texture_pass.cpp +++ b/src/shader_recompiler/ir_opt/texture_pass.cpp | |||
| @@ -486,10 +486,10 @@ void PatchTexelFetch(IR::Block& block, IR::Inst& inst, TexturePixelFormat pixel_ | |||
| 486 | const IR::F32 w(ir.CompositeExtract(new_inst, 3)); | 486 | const IR::F32 w(ir.CompositeExtract(new_inst, 3)); |
| 487 | const IR::F16F32F64 max_value(ir.Imm32(get_max_value())); | 487 | const IR::F16F32F64 max_value(ir.Imm32(get_max_value())); |
| 488 | const IR::Value converted = | 488 | const IR::Value converted = |
| 489 | ir.CompositeConstruct(ir.FPMul(ir.ConvertSToF(32, 32, ir.BitCast<IR::S32>(x)), max_value), | 489 | ir.CompositeConstruct(ir.FPMul(ir.ConvertSToF(32, 32, ir.BitCast<IR::U32>(x)), max_value), |
| 490 | ir.FPMul(ir.ConvertSToF(32, 32, ir.BitCast<IR::S32>(y)), max_value), | 490 | ir.FPMul(ir.ConvertSToF(32, 32, ir.BitCast<IR::U32>(y)), max_value), |
| 491 | ir.FPMul(ir.ConvertSToF(32, 32, ir.BitCast<IR::S32>(z)), max_value), | 491 | ir.FPMul(ir.ConvertSToF(32, 32, ir.BitCast<IR::U32>(z)), max_value), |
| 492 | ir.FPMul(ir.ConvertSToF(32, 32, ir.BitCast<IR::S32>(w)), max_value)); | 492 | ir.FPMul(ir.ConvertSToF(32, 32, ir.BitCast<IR::U32>(w)), max_value)); |
| 493 | inst.ReplaceUsesWith(converted); | 493 | inst.ReplaceUsesWith(converted); |
| 494 | } | 494 | } |
| 495 | } // Anonymous namespace | 495 | } // Anonymous namespace |