aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/ir_opt/texture_pass.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-01-29 12:27:26 -0500
committerGitHub <noreply@github.com>2023-01-29 12:27:26 -0500
commita5bc2444d2b38b4d9e0bc6c8cecc1a90feb61490 (patch)
tree830bb769857629e25b0e43fefd79d8bfe0b231e9 /src/shader_recompiler/ir_opt/texture_pass.cpp
parent4d775a93291bb94771fa4467b01fbc28fd92cbf7 (diff)
parent2d2558797c40523e0aa4ac8a6453c642f0eaa131 (diff)
Merge pull request #9694 from ameerj/txq-mips
shader_recompiler: TXQ: Skip QueryLevels when possible
Diffstat (limited to 'src/shader_recompiler/ir_opt/texture_pass.cpp')
-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 70b620dcb1..b28194d0ef 100644
--- a/src/shader_recompiler/ir_opt/texture_pass.cpp
+++ b/src/shader_recompiler/ir_opt/texture_pass.cpp
@@ -452,7 +452,8 @@ void PatchImageSampleImplicitLod(IR::Block& block, IR::Inst& inst) {
const IR::Value coord(inst.Arg(1));
const IR::Value handle(ir.Imm32(0));
const IR::U32 lod{ir.Imm32(0)};
- const IR::Value texture_size = ir.ImageQueryDimension(handle, lod, info);
+ const IR::U1 skip_mips{ir.Imm1(true)};
+ const IR::Value texture_size = ir.ImageQueryDimension(handle, lod, skip_mips, info);
inst.SetArg(
1, ir.CompositeConstruct(
ir.FPMul(IR::F32(ir.CompositeExtract(coord, 0)),