Mesa (master): pan/bi: Don't use TEXS for tex operations with a src that's not lod or coord
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 17 08:24:49 UTC 2020
Module: Mesa
Branch: master
Commit: 045ae5434330e864a5ee97c60ba7ecac5a26cc46
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=045ae5434330e864a5ee97c60ba7ecac5a26cc46
Author: Boris Brezillon <boris.brezillon at collabora.com>
Date: Thu Nov 12 18:18:57 2020 +0100
pan/bi: Don't use TEXS for tex operations with a src that's not lod or coord
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7636>
---
src/panfrost/bifrost/bifrost_compile.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index f36460ce412..8b7989cf97e 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -2058,12 +2058,15 @@ emit_texc(bi_context *ctx, nir_tex_instr *instr)
static bool
bi_is_normal_tex(gl_shader_stage stage, nir_tex_instr *instr)
{
- if (instr->op == nir_texop_tex)
- return true;
-
- if (instr->op != nir_texop_txl)
+ if (instr->op != nir_texop_tex && instr->op != nir_texop_txl)
return false;
+ for (unsigned i = 0; i < instr->num_srcs; ++i) {
+ if (instr->src[i].src_type != nir_tex_src_lod &&
+ instr->src[i].src_type != nir_tex_src_coord)
+ return false;
+ }
+
int lod_idx = nir_tex_instr_src_index(instr, nir_tex_src_lod);
if (lod_idx < 0)
return true;
More information about the mesa-commit
mailing list