diff options
| author | 2021-10-24 15:16:31 -0400 | |
|---|---|---|
| committer | 2021-10-24 15:16:31 -0400 | |
| commit | aed5878dd39f16be49c006e56801e348ad9e2a78 (patch) | |
| tree | c12938945785f81278ffdce2168c797397e9d745 /src/shader_recompiler/ir_opt/texture_pass.cpp | |
| parent | Merge pull request #7221 from astrelsky/stepfix (diff) | |
| parent | TexturePass: Fix clamping of images as this allowed negative indices. (diff) | |
| download | yuzu-aed5878dd39f16be49c006e56801e348ad9e2a78.tar.gz yuzu-aed5878dd39f16be49c006e56801e348ad9e2a78.tar.xz yuzu-aed5878dd39f16be49c006e56801e348ad9e2a78.zip | |
Merge pull request #7222 from FernandoS27/fix-indixed-textures-again
TexturePass: Fix clamping of images as this allowed negative indices.
Diffstat (limited to 'src/shader_recompiler/ir_opt/texture_pass.cpp')
| -rw-r--r-- | src/shader_recompiler/ir_opt/texture_pass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp index 225c238fb..96c997a58 100644 --- a/src/shader_recompiler/ir_opt/texture_pass.cpp +++ b/src/shader_recompiler/ir_opt/texture_pass.cpp | |||
| @@ -492,7 +492,7 @@ void TexturePass(Environment& env, IR::Program& program) { | |||
| 492 | const auto insert_point{IR::Block::InstructionList::s_iterator_to(*inst)}; | 492 | const auto insert_point{IR::Block::InstructionList::s_iterator_to(*inst)}; |
| 493 | IR::IREmitter ir{*texture_inst.block, insert_point}; | 493 | IR::IREmitter ir{*texture_inst.block, insert_point}; |
| 494 | const IR::U32 shift{ir.Imm32(std::countr_zero(DESCRIPTOR_SIZE))}; | 494 | const IR::U32 shift{ir.Imm32(std::countr_zero(DESCRIPTOR_SIZE))}; |
| 495 | inst->SetArg(0, ir.SMin(ir.ShiftRightArithmetic(cbuf.dynamic_offset, shift), | 495 | inst->SetArg(0, ir.UMin(ir.ShiftRightArithmetic(cbuf.dynamic_offset, shift), |
| 496 | ir.Imm32(DESCRIPTOR_SIZE - 1))); | 496 | ir.Imm32(DESCRIPTOR_SIZE - 1))); |
| 497 | } else { | 497 | } else { |
| 498 | inst->SetArg(0, IR::Value{}); | 498 | inst->SetArg(0, IR::Value{}); |