Mesa (staging/20.3): ir3: fix has_src() to return correctly in ir3_nir_lower_tex_prefetch
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Mar 17 17:46:36 UTC 2021
Module: Mesa
Branch: staging/20.3
Commit: b44217343b654dddef9b7e411a1a76c76f588e43
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b44217343b654dddef9b7e411a1a76c76f588e43
Author: Hyunjun Ko <zzoon at igalia.com>
Date: Tue Mar 9 05:47:21 2021 +0000
ir3: fix has_src() to return correctly in ir3_nir_lower_tex_prefetch
This seems to be originally introduced from 2a0d45ae6c, and 562aaea07c
misused the method.
Fixes: 2a0d45ae6c "freedreno/ir3: Add a NIR pass to select tex instructions eligible for pre-fetch"
Fixes: 562aaea07c "freedreno/ir3: respect tex prefetch limits"
Signed-off-by: Hyunjun Ko <zzoon at igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev at igalia.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125>
(cherry picked from commit 433cdd1cff28dcd33028a4b6296d9a9fc6f144ed)
---
.pick_status.json | 2 +-
src/freedreno/ir3/ir3_nir_lower_tex_prefetch.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 65a62722c01..412857ea1fc 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -904,7 +904,7 @@
"description": "ir3: fix has_src() to return correctly in ir3_nir_lower_tex_prefetch",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "2a0d45ae6cf09d60c048d7854e3d082bf15e374f"
},
diff --git a/src/freedreno/ir3/ir3_nir_lower_tex_prefetch.c b/src/freedreno/ir3/ir3_nir_lower_tex_prefetch.c
index 38474749955..8bcccfe29dd 100644
--- a/src/freedreno/ir3/ir3_nir_lower_tex_prefetch.c
+++ b/src/freedreno/ir3/ir3_nir_lower_tex_prefetch.c
@@ -107,7 +107,7 @@ ir3_nir_coord_offset(nir_ssa_def *ssa)
static bool
has_src(nir_tex_instr *tex, nir_tex_src_type type)
{
- return nir_tex_instr_src_index(tex, type) > 0;
+ return nir_tex_instr_src_index(tex, type) >= 0;
}
static bool
More information about the mesa-commit
mailing list