Skip to content
Snippets Groups Projects
Commit 8b14b9dc authored by Mike Blumenkrantz's avatar Mike Blumenkrantz :lifter: Committed by Dylan Baker
Browse files

nir/lower_tex: fix rect queries with lower_rect set


queries still need the sampler_dim changed

Fixes: 682e14d3 ("nir: lower_tex: Don't normalize coordinates for TXF with RECT")

Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Part-of: <mesa/mesa!15895>
(cherry picked from commit 5b0634d7)
parent 4f038076
No related branches found
Tags mesa-22.0.3
No related merge requests found
......@@ -1956,7 +1956,7 @@
"description": "nir/lower_tex: fix rect queries with lower_rect set",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"because_sha": "682e14d3eaee8991ee08ea309cbf9a509b6e6b27"
},
{
......
......@@ -1328,9 +1328,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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment