Mesa (master): pan/bi: Fix the !immediate case in bi_emit_store_vary()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 13 17:23:31 UTC 2021


Module: Mesa
Branch: master
Commit: 0ad83e33619a1d7547c34972eb1c6df62ed0bce7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ad83e33619a1d7547c34972eb1c6df62ed0bce7

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Wed Jan 13 11:18:11 2021 +0100

pan/bi: Fix the !immediate case in bi_emit_store_vary()

The base offset was ignored, take it into account.

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/8469>

---

 .gitlab-ci/deqp-panfrost-g52-fails.txt |  5 -----
 .gitlab-ci/deqp-panfrost-g52-skips.txt |  3 ---
 src/panfrost/bifrost/bifrost_compile.c | 27 +++++++++++++++++----------
 3 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/.gitlab-ci/deqp-panfrost-g52-fails.txt b/.gitlab-ci/deqp-panfrost-g52-fails.txt
index 54827ab32cc..e69de29bb2d 100644
--- a/.gitlab-ci/deqp-panfrost-g52-fails.txt
+++ b/.gitlab-ci/deqp-panfrost-g52-fails.txt
@@ -1,5 +0,0 @@
-dEQP-GLES3.functional.transform_feedback.random.interleaved.lines.9,Fail
-dEQP-GLES3.functional.transform_feedback.random.interleaved.points.1,Fail
-dEQP-GLES3.functional.transform_feedback.random.interleaved.points.3,Fail
-dEQP-GLES3.functional.transform_feedback.random.interleaved.triangles.5,Fail
-dEQP-GLES3.functional.transform_feedback.random.interleaved.triangles.9,Fail
diff --git a/.gitlab-ci/deqp-panfrost-g52-skips.txt b/.gitlab-ci/deqp-panfrost-g52-skips.txt
index f403ac66e8d..792043eb717 100644
--- a/.gitlab-ci/deqp-panfrost-g52-skips.txt
+++ b/.gitlab-ci/deqp-panfrost-g52-skips.txt
@@ -13,6 +13,3 @@ dEQP-GLES[0-9]*.functional.flush_finish.*
 # reasons. This needs to be sorted out asap to avoid creating flakes in the near
 # future, which would be a Very Bad Thing.
 dEQP-GLES2.functional.shaders.indexing.tmp_array.vec3_const_write_dynamic_loop_read_vertex
-
-# This test seems to pass/fail randomly, skip it for now.
-dEQP-GLES3.functional.transform_feedback.array_element.interleaved.triangles.mediump_mat2x4
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 9405547bcb8..2e9c42a3efb 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -445,19 +445,26 @@ bi_emit_store_vary(bi_builder *b, nir_intrinsic_instr *instr)
         nir_alu_type T = nir_intrinsic_src_type(instr);
         enum bi_register_format regfmt = bi_reg_fmt_for_nir(T);
 
-        nir_src *offset = nir_get_io_offset_src(instr);
         unsigned imm_index = 0;
         bool immediate = bi_is_intr_immediate(instr, &imm_index, 16);
 
-        bi_index address = immediate ?
-                bi_lea_attr_imm(b,
-                                bi_register(61), /* TODO RA */
-                                bi_register(62), /* TODO RA */
-                                regfmt, imm_index) :
-                bi_lea_attr(b,
-                                bi_register(61), /* TODO RA */
-                                bi_register(62), /* TODO RA */
-                                bi_src_index(offset), regfmt);
+        bi_index address;
+        if (immediate) {
+                address = bi_lea_attr_imm(b,
+                                          bi_register(61), /* TODO RA */
+                                          bi_register(62), /* TODO RA */
+                                          regfmt, imm_index);
+        } else {
+                bi_index idx =
+                        bi_iadd_u32(b,
+                                    bi_src_index(nir_get_io_offset_src(instr)),
+                                    bi_imm_u32(nir_intrinsic_base(instr)),
+                                    false);
+                address = bi_lea_attr(b,
+                                      bi_register(61), /* TODO RA */
+                                      bi_register(62), /* TODO RA */
+                                      idx, regfmt);
+        }
 
         /* Only look at the total components needed. In effect, we fill in all
          * the intermediate "holes" in the write mask, since we can't mask off



More information about the mesa-commit mailing list