Module: Mesa Branch: staging/20.0 Commit: 5f1f6ee8c671394dfd84d3dbf00fba2b7de2eba3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f1f6ee8c671394dfd84d3dbf00fba2b7de2eba3
Author: Gert Wollny <gert.wol...@collabora.com> Date: Tue May 19 17:52:31 2020 +0200 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 <gert.wol...@collabora.com> Reviewed-by: Jason Ekstrand <ja...@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5105> (cherry picked from commit 682e14d3eaee8991ee08ea309cbf9a509b6e6b27) --- .pick_status.json | 2 +- src/compiler/nir/nir_lower_tex.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4ca5fa94a02..b8581d5de41 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1039,7 +1039,7 @@ "description": "nir: lower_tex: Don't normalize coordinates for TXF with RECT", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "1ce8060c25c7f2c7a54159fab6a6974c0ba182a8" }, diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index 6c8c6aa1164..e1cd6817724 100644 --- a/src/compiler/nir/nir_lower_tex.c +++ b/src/compiler/nir/nir_lower_tex.c @@ -958,7 +958,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; } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit