Mesa (staging/20.1): v3d: set instance id to 0 at start of tile

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 27 22:05:36 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 9352c866ded8066df9c0eab1f830bbad6964de64
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9352c866ded8066df9c0eab1f830bbad6964de64

Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date:   Mon Aug 24 10:33:46 2020 +0200

v3d: set instance id to 0 at start of tile

PTB assumes that base instance to be 0 at start of tile, but hw would
not do that, we need to set it. It is worth to note that the opcode
name is somewhat confusing as what it really sets is the base
instance. We could rename the opcode, but then the name would be
different to the original Broadcom name, so confusing in any case.

This fixes several dEQP-GLES3 and dEQP-GLES31 tests that passes
individually, but started to fail depending on other tests running
before using base instance different to zero.

This is the backport of a Vulkan patch that fixed some Vulkan CTS
tests that start to fails after some other tests used an instance id.

CC: 20.2 20.1 <mesa-stable at lists.freedesktop.org>

Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6447>
(cherry picked from commit 05a0349949921406aefe1d99e9d2af84629997e1)

---

 .pick_status.json                  | 2 +-
 src/gallium/drivers/v3d/v3dx_rcl.c | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 37979c954ec..fc6086d3add 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -373,7 +373,7 @@
         "description": "v3d: set instance id to 0 at start of tile",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c
index 0582e9abab0..739088ec3ed 100644
--- a/src/gallium/drivers/v3d/v3dx_rcl.c
+++ b/src/gallium/drivers/v3d/v3dx_rcl.c
@@ -440,6 +440,13 @@ v3d_rcl_emit_generic_per_tile_list(struct v3d_job *job, int layer)
                 fmt.primitive_type = LIST_TRIANGLES;
         }
 
+#if V3D_VERSION >= 41
+        /* PTB assumes that value to be 0, but hw will not set it. */
+        cl_emit(cl, SET_INSTANCEID, set) {
+           set.instance_id = 0;
+        }
+#endif
+
         cl_emit(cl, BRANCH_TO_IMPLICIT_TILE_LIST, branch);
 
         v3d_rcl_emit_stores(job, cl, layer);



More information about the mesa-commit mailing list