diff options
| author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2021-10-16 21:41:54 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-16 21:41:54 -0400 |
| commit | fc0a5a2b84e6cb7b6a7be26b8a49b362a1943c2f (patch) | |
| tree | b70ed6e2d0f75589532a0e6c197b970bf328e20a /src/shader_recompiler/ir_opt/texture_pass.cpp | |
| parent | fb99f7532ae56d059d4d2083744f03c49e123920 (diff) | |
| parent | 1a0006ef55eca3f27df6a647d42974a63dabf611 (diff) | |
Merge pull request #7077 from FernandoS27/face-down
A series of fixes to queries and indexed samplers.
Diffstat (limited to 'src/shader_recompiler/ir_opt/texture_pass.cpp')
| -rw-r--r-- | src/shader_recompiler/ir_opt/texture_pass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp index 44ad10d43f..225c238fb6 100644 --- a/src/shader_recompiler/ir_opt/texture_pass.cpp +++ b/src/shader_recompiler/ir_opt/texture_pass.cpp @@ -492,7 +492,8 @@ void TexturePass(Environment& env, IR::Program& program) { const auto insert_point{IR::Block::InstructionList::s_iterator_to(*inst)}; IR::IREmitter ir{*texture_inst.block, insert_point}; const IR::U32 shift{ir.Imm32(std::countr_zero(DESCRIPTOR_SIZE))}; - inst->SetArg(0, ir.ShiftRightArithmetic(cbuf.dynamic_offset, shift)); + inst->SetArg(0, ir.SMin(ir.ShiftRightArithmetic(cbuf.dynamic_offset, shift), + ir.Imm32(DESCRIPTOR_SIZE - 1))); } else { inst->SetArg(0, IR::Value{}); } |
