summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-09-24 01:14:49 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-10-17 03:38:09 +0200
commit3f4444b552c47e07ff934750e25740a60382db0b (patch)
treeb2d1e5c84ba8e2fae8eb8dc2f6c4a87b971372f9 /src
parentVulkan Query Cache: make sure to wait for the query result. (diff)
downloadyuzu-3f4444b552c47e07ff934750e25740a60382db0b.tar
yuzu-3f4444b552c47e07ff934750e25740a60382db0b.tar.gz
yuzu-3f4444b552c47e07ff934750e25740a60382db0b.tar.bz2
yuzu-3f4444b552c47e07ff934750e25740a60382db0b.tar.lz
yuzu-3f4444b552c47e07ff934750e25740a60382db0b.tar.xz
yuzu-3f4444b552c47e07ff934750e25740a60382db0b.tar.zst
yuzu-3f4444b552c47e07ff934750e25740a60382db0b.zip
Diffstat (limited to 'src')
-rw-r--r--src/shader_recompiler/ir_opt/texture_pass.cpp3
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 44ad10d43..225c238fb 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{});
}