diff --git a/.pick_status.json b/.pick_status.json index 44b622cc32d..b2113ded6fc 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1813,7 +1813,7 @@ "description": "nir/lower_tex: fix rect queries with lower_rect set", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "682e14d3eaee8991ee08ea309cbf9a509b6e6b27" }, diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index 511171da60d..d011ee63759 100644 --- a/src/compiler/nir/nir_lower_tex.c +++ b/src/compiler/nir/nir_lower_tex.c @@ -1334,9 +1334,10 @@ nir_lower_tex_block(nir_block *block, nir_builder *b, } if ((tex->sampler_dim == GLSL_SAMPLER_DIM_RECT) && options->lower_rect && - tex->op != nir_texop_txf && !nir_tex_instr_is_query(tex)) { - - if (compiler_options->has_txs) + tex->op != nir_texop_txf) { + if (nir_tex_instr_is_query(tex)) + tex->sampler_dim = GLSL_SAMPLER_DIM_2D; + else if (compiler_options->has_txs) lower_rect(b, tex); else lower_rect_tex_scale(b, tex);