Mesa (main): freedreno/ir3: Fix off-by-one in prefetch safety assert.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 4 23:10:01 UTC 2021


Module: Mesa
Branch: main
Commit: 34739cb6e28c725a2ebd95d32dc6b8e90f32cace
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=34739cb6e28c725a2ebd95d32dc6b8e90f32cace

Author: Emma Anholt <emma at anholt.net>
Date:   Wed Nov  3 13:29:28 2021 -0700

freedreno/ir3: Fix off-by-one in prefetch safety assert.

This looks like just a typo, we allow up to == 0xf in the lowering pass.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668>

---

 src/freedreno/ci/freedreno-a630-fails.txt | 3 ---
 src/freedreno/ir3/ir3_compiler_nir.c      | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt
index 07fe4baf250..5d2353269e1 100644
--- a/src/freedreno/ci/freedreno-a630-fails.txt
+++ b/src/freedreno/ci/freedreno-a630-fails.txt
@@ -82,9 +82,6 @@ spec at arb_arrays_of_arrays@execution at image_store@basic-imagestore-mixed-const-non
 spec at arb_arrays_of_arrays@execution at image_store@basic-imagestore-mixed-const-non-const-uniform-index,Crash
 spec at arb_arrays_of_arrays@execution at image_store@basic-imagestore-non-const-uniform-index,Crash
 
-# "shader_runner: ../src/freedreno/ir3/ir3_compiler_nir.c:3928: collect_tex_prefetches: Assertion `fetch->samp_id < 0xf' failed."
-spec at arb_arrays_of_arrays@execution at sampler@fs-struct-const-index-sampler-const-index,Crash
-
 spec at arb_compute_shader@execution at border-color,Fail
 spec at arb_depth_buffer_float@fbo-clear-formats stencil,Fail
 spec at arb_depth_buffer_float@fbo-clear-formats stencil at GL_DEPTH32F_STENCIL8,Fail
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c
index abee9638c1e..3a854458669 100644
--- a/src/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/freedreno/ir3/ir3_compiler_nir.c
@@ -4053,7 +4053,7 @@ collect_tex_prefetches(struct ir3_context *ctx, struct ir3 *ir)
              */
             assert(fetch->dst <= 0x3f);
             assert(fetch->tex_id <= 0x1f);
-            assert(fetch->samp_id < 0xf);
+            assert(fetch->samp_id <= 0xf);
 
             ctx->so->total_in =
                MAX2(ctx->so->total_in, instr->prefetch.input_offset + 2);



More information about the mesa-commit mailing list