From 682e14d3eaee8991ee08ea309cbf9a509b6e6b27 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 19 May 2020 17:52:31 +0200 Subject: [PATCH] nir: lower_tex: Don't normalize coordinates for TXF with RECT v2: remove the option to actually request normalization and its application in Intel < Gen6 (Jason) v3: Also don't lower for query operations (Jason) Fixes: 1ce8060c25c7f2c7a54159fab6a6974c0ba182a8 nir/lower_tex: support for lowering RECT textures Signed-off-by: Gert Wollny Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir_lower_tex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index 18bbd1e39a8..8f373ddf67a 100644 --- a/src/compiler/nir/nir_lower_tex.c +++ b/src/compiler/nir/nir_lower_tex.c @@ -959,7 +959,8 @@ nir_lower_tex_block(nir_block *block, nir_builder *b, progress = lower_offset(b, tex) || progress; } - if ((tex->sampler_dim == GLSL_SAMPLER_DIM_RECT) && options->lower_rect) { + if ((tex->sampler_dim == GLSL_SAMPLER_DIM_RECT) && options->lower_rect && + tex->op != nir_texop_txf && !nir_tex_instr_is_query(tex)) { lower_rect(b, tex); progress = true; } -- 2.30.2