panfrost: Inline bifrost_tiler_only
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 26 Aug 2020 17:21:06 +0000 (13:21 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Aug 2020 14:53:53 +0000 (14:53 +0000)
Pointless abstraction now that fused jobs are dropped.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476>

src/gallium/drivers/panfrost/pan_cmdstream.c
src/panfrost/include/panfrost-job.h
src/panfrost/lib/decode.c

index bb5d018f7bdfe0818db3708f7e42c39c75d134d9..c2c54814987300d21ba9643e3cea616b77a4e8aa 100644 (file)
@@ -1803,8 +1803,8 @@ panfrost_emit_vertex_tiler_jobs(struct panfrost_batch *batch,
                 vp_size = sizeof(bifrost_vertex);
 
                 bifrost_tiler.prefix = *tiler_prefix;
-                bifrost_tiler.tiler.primitive_size = *primitive_size;
-                bifrost_tiler.tiler.tiler_meta = panfrost_batch_get_tiler_meta(batch, ~0);
+                bifrost_tiler.primitive_size = *primitive_size;
+                bifrost_tiler.tiler_meta = panfrost_batch_get_tiler_meta(batch, ~0);
                 memcpy(&bifrost_tiler.postfix, tiler_draw, MALI_DRAW_LENGTH);
                 tp = &bifrost_tiler;
                 tp_size = sizeof(bifrost_tiler);
index 9fc6bd360e95cb03a3254063b2d3c8fc3a7eb1fd..14102bea14339b80fd609bf0dd6dc6eb731a5f22 100644 (file)
@@ -464,15 +464,6 @@ struct bifrost_tiler_meta {
         u64 zeros[20];
 } __attribute__((packed));
 
-struct bifrost_tiler_only {
-        /* 0x20 */
-        union midgard_primitive_size primitive_size;
-
-        mali_ptr tiler_meta;
-
-        u64 zero1, zero2, zero3, zero4, zero5, zero6;
-} __attribute__((packed));
-
 struct mali_vertex_tiler_postfix {
         u16 gl_enables; // 0x6 on Midgard, 0x2 on Bifrost
 
@@ -543,7 +534,9 @@ struct bifrost_payload_vertex {
 
 struct bifrost_payload_tiler {
         struct mali_vertex_tiler_prefix prefix;
-        struct bifrost_tiler_only tiler;
+        union midgard_primitive_size primitive_size;
+        mali_ptr tiler_meta;
+        u64 zero1, zero2, zero3, zero4, zero5, zero6;
         struct mali_vertex_tiler_postfix postfix;
 } __attribute__((packed));
 
index c6e23b1eda91caca6c17261f3798dba38e080ae2..f3705094f2e499971fa1599ecccaab81b18d8ea8 100644 (file)
@@ -1969,30 +1969,6 @@ pandecode_primitive_size(union midgard_primitive_size u, bool constant)
         pandecode_log("},\n");
 }
 
-static void
-pandecode_tiler_only_bfr(const struct bifrost_tiler_only *t, int job_no)
-{
-        pandecode_log_cont("{\n");
-        pandecode_indent++;
-
-        /* TODO: gl_PointSize on Bifrost */
-        pandecode_primitive_size(t->primitive_size, true);
-
-        if (t->zero1 || t->zero2 || t->zero3 || t->zero4 || t->zero5
-            || t->zero6) {
-                pandecode_msg("XXX: tiler only zero tripped\n");
-                pandecode_prop("zero1 = 0x%" PRIx64, t->zero1);
-                pandecode_prop("zero2 = 0x%" PRIx64, t->zero2);
-                pandecode_prop("zero3 = 0x%" PRIx64, t->zero3);
-                pandecode_prop("zero4 = 0x%" PRIx64, t->zero4);
-                pandecode_prop("zero5 = 0x%" PRIx64, t->zero5);
-                pandecode_prop("zero6 = 0x%" PRIx64, t->zero6);
-        }
-
-        pandecode_indent--;
-        pandecode_log("},\n");
-}
-
 static int
 pandecode_vertex_job_bfr(const struct mali_job_descriptor_header *h,
                                 const struct pandecode_mapped_memory *mem,
@@ -2022,15 +1998,26 @@ pandecode_tiler_job_bfr(const struct mali_job_descriptor_header *h,
         struct bifrost_payload_tiler *PANDECODE_PTR_VAR(t, mem, payload);
 
         pandecode_vertex_tiler_postfix_pre(&t->postfix, job_no, h->job_type, "", true, gpu_id);
-        pandecode_tiler_meta(t->tiler.tiler_meta, job_no);
+        pandecode_tiler_meta(t->tiler_meta, job_no);
 
         pandecode_log("struct bifrost_payload_tiler payload_%"PRIx64"_%d = {\n", payload, job_no);
         pandecode_indent++;
 
         pandecode_vertex_tiler_prefix(&t->prefix, job_no, false);
 
-        pandecode_log(".tiler = ");
-        pandecode_tiler_only_bfr(&t->tiler, job_no);
+        /* TODO: gl_PointSize on Bifrost */
+        pandecode_primitive_size(t->primitive_size, true);
+
+        if (t->zero1 || t->zero2 || t->zero3 || t->zero4 || t->zero5
+            || t->zero6) {
+                pandecode_msg("XXX: tiler only zero tripped\n");
+                pandecode_prop("zero1 = 0x%" PRIx64, t->zero1);
+                pandecode_prop("zero2 = 0x%" PRIx64, t->zero2);
+                pandecode_prop("zero3 = 0x%" PRIx64, t->zero3);
+                pandecode_prop("zero4 = 0x%" PRIx64, t->zero4);
+                pandecode_prop("zero5 = 0x%" PRIx64, t->zero5);
+                pandecode_prop("zero6 = 0x%" PRIx64, t->zero6);
+        }
 
         pandecode_vertex_tiler_postfix(&t->postfix, job_no, true);