Mesa (master): pan/decode: Be explicit when printing invocations

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 3 14:18:28 UTC 2021


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Mon Jan 18 12:58:36 2021 -0500

pan/decode: Be explicit when printing invocations

Our "canonical" forms weren't really... good.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829>

---

 src/panfrost/lib/decode.c | 28 ++++++----------------------
 1 file changed, 6 insertions(+), 22 deletions(-)

diff --git a/src/panfrost/lib/decode.c b/src/panfrost/lib/decode.c
index 468d4f37853..1337c76f4ce 100644
--- a/src/panfrost/lib/decode.c
+++ b/src/panfrost/lib/decode.c
@@ -552,7 +552,7 @@ bits(u32 word, u32 lo, u32 hi)
 }
 
 static void
-pandecode_invocation(const void *i, bool graphics)
+pandecode_invocation(const void *i)
 {
         /* Decode invocation_count. See the comment before the definition of
          * invocation_count for an explanation.
@@ -567,26 +567,11 @@ pandecode_invocation(const void *i, bool graphics)
         unsigned groups_y = bits(invocation.invocations, invocation.workgroups_y_shift, invocation.workgroups_z_shift) + 1;
         unsigned groups_z = bits(invocation.invocations, invocation.workgroups_z_shift, 32) + 1;
 
-        /* Even though we have this decoded, we want to ensure that the
-         * representation is "unique" so we don't lose anything by printing only
-         * the final result. More specifically, we need to check that we were
-         * passed something in canonical form, since the definition per the
-         * hardware is inherently not unique. How? Well, take the resulting
-         * decode and pack it ourselves! If it is bit exact with what we
-         * decoded, we're good to go. */
-
-        struct mali_invocation_packed ref;
-        panfrost_pack_work_groups_compute(&ref, groups_x, groups_y, groups_z, size_x, size_y, size_z, graphics);
-
-        if (memcmp(&ref, i, sizeof(ref))) {
-                pandecode_msg("XXX: non-canonical workgroups packing\n");
-                DUMP_UNPACKED(INVOCATION, invocation, "Invocation:\n")
-        }
-
-        /* Regardless, print the decode */
         pandecode_log("Invocation (%d, %d, %d) x (%d, %d, %d)\n",
                       size_x, size_y, size_z,
                       groups_x, groups_y, groups_z);
+
+        DUMP_UNPACKED(INVOCATION, invocation, "Invocation:\n")
 }
 
 static void
@@ -1144,8 +1129,7 @@ pandecode_vertex_compute_geometry_job(const struct MALI_JOB_HEADER *h,
 
         pandecode_log("Vertex Job Payload:\n");
         pandecode_indent++;
-        pandecode_invocation(pan_section_ptr(p, COMPUTE_JOB, INVOCATION),
-                             h->type != MALI_JOB_TYPE_COMPUTE);
+        pandecode_invocation(pan_section_ptr(p, COMPUTE_JOB, INVOCATION));
         DUMP_SECTION(COMPUTE_JOB, PARAMETERS, p, "Vertex Job Parameters:\n");
         DUMP_UNPACKED(DRAW, draw, "Draw:\n");
         pandecode_indent--;
@@ -1166,7 +1150,7 @@ pandecode_tiler_job_bfr(const struct MALI_JOB_HEADER *h,
         pandecode_indent++;
         pandecode_bifrost_tiler(tiler_ptr.address, job_no);
 
-        pandecode_invocation(pan_section_ptr(p, BIFROST_TILER_JOB, INVOCATION), true);
+        pandecode_invocation(pan_section_ptr(p, BIFROST_TILER_JOB, INVOCATION));
         pandecode_primitive(pan_section_ptr(p, BIFROST_TILER_JOB, PRIMITIVE));
 
         /* TODO: gl_PointSize on Bifrost */
@@ -1188,7 +1172,7 @@ pandecode_tiler_job_mdg(const struct MALI_JOB_HEADER *h,
 
         pandecode_log("Tiler Job Payload:\n");
         pandecode_indent++;
-        pandecode_invocation(pan_section_ptr(p, MIDGARD_TILER_JOB, INVOCATION), true);
+        pandecode_invocation(pan_section_ptr(p, MIDGARD_TILER_JOB, INVOCATION));
         pandecode_primitive(pan_section_ptr(p, MIDGARD_TILER_JOB, PRIMITIVE));
         DUMP_UNPACKED(DRAW, draw, "Draw:\n");
 



More information about the mesa-commit mailing list