panfrost: Set defaults for deprecated DCD fields
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 8 Feb 2022 18:49:40 +0000 (13:49 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 23 Feb 2022 12:56:30 +0000 (12:56 +0000)
There are always set to true. Don't pollute the driver code with them, make
their existence a local detail to pre-Valhall XML and that's it.

Functional change: "four components per vertex" is now set on vertex job DCDs.
This should be a no-op.

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

src/gallium/drivers/panfrost/pan_cmdstream.c
src/panfrost/lib/genxml/v4.xml
src/panfrost/lib/genxml/v5.xml
src/panfrost/lib/genxml/v6.xml
src/panfrost/lib/genxml/v7.xml
src/panfrost/lib/pan_blitter.c
src/panfrost/vulkan/panvk_vX_cs.c
src/panfrost/vulkan/panvk_vX_meta_clear.c
src/panfrost/vulkan/panvk_vX_meta_copy.c

index c09bb95..e7e6783 100644 (file)
@@ -2754,10 +2754,6 @@ panfrost_draw_emit_tiler(struct panfrost_batch *batch,
 
         section = pan_section_ptr(job, TILER_JOB, DRAW);
         pan_pack(section, DRAW, cfg) {
-                cfg.four_components_per_vertex = true;
-                cfg.draw_descriptor_is_64b = true;
-                cfg.front_face_ccw = rast->front_ccw;
-
                 /*
                  * From the Gallium documentation,
                  * pipe_rasterizer_state::cull_face "indicates which faces of
@@ -2768,6 +2764,7 @@ panfrost_draw_emit_tiler(struct panfrost_batch *batch,
                  */
                 cfg.cull_front_face = polygon && (rast->cull_face & PIPE_FACE_FRONT);
                 cfg.cull_back_face = polygon && (rast->cull_face & PIPE_FACE_BACK);
+                cfg.front_face_ccw = rast->front_ccw;
                 cfg.position = pos;
                 cfg.state = batch->rsd[PIPE_SHADER_FRAGMENT];
                 cfg.attributes = batch->attribs[PIPE_SHADER_FRAGMENT];
index cbdfd1b..f34472e 100644 (file)
   </struct>
 
   <struct name="Draw" size="30" align="64">
-    <field name="Four Components Per Vertex" size="1" start="0:0" type="bool"/>
-    <field name="Draw Descriptor Is 64b" size="1" start="0:1" type="bool"/>
+    <field name="Four Components Per Vertex" size="1" start="0:0" type="bool" default="true"/>
+    <field name="Draw Descriptor Is 64b" size="1" start="0:1" type="bool" default="true"/>
     <field name="Texture Descriptor Is 64b" size="1" start="0:2" type="bool" default="true"/>
     <field name="Occlusion query" size="2" start="0:3" type="Occlusion Mode" default="Disabled"/>
     <field name="Front face CCW" size="1" start="0:5" type="bool"/>
index fb2e9c5..394918e 100644 (file)
   </struct>
 
   <struct name="Draw" size="30" align="64">
-    <field name="Four Components Per Vertex" size="1" start="0:0" type="bool"/>
-    <field name="Draw Descriptor Is 64b" size="1" start="0:1" type="bool"/>
+    <field name="Four Components Per Vertex" size="1" start="0:0" type="bool" default="true"/>
+    <field name="Draw Descriptor Is 64b" size="1" start="0:1" type="bool" default="true"/>
     <field name="Texture Descriptor Is 64b" size="1" start="0:2" type="bool" default="true"/>
     <field name="Occlusion query" size="2" start="0:3" type="Occlusion Mode" default="Disabled"/>
     <field name="Front face CCW" size="1" start="0:5" type="bool"/>
index f5e7039..8bd9790 100644 (file)
   </struct>
 
   <struct name="Draw" size="32" align="64">
-    <field name="Four Components Per Vertex" size="1" start="0:0" type="bool"/>
-    <field name="Draw Descriptor Is 64b" size="1" start="0:1" type="bool"/>
+    <field name="Four Components Per Vertex" size="1" start="0:0" type="bool" default="true"/>
+    <field name="Draw Descriptor Is 64b" size="1" start="0:1" type="bool" default="true"/>
     <field name="Occlusion query" size="2" start="0:3" type="Occlusion Mode" default="Disabled"/>
     <field name="Front face CCW" size="1" start="0:5" type="bool"/>
     <field name="Cull front face" size="1" start="0:6" type="bool"/>
index 5722dbc..c2e021c 100644 (file)
   </struct>
 
   <struct name="Draw" size="32" align="64">
-    <field name="Four Components Per Vertex" size="1" start="0:0" type="bool"/>
-    <field name="Draw Descriptor Is 64b" size="1" start="0:1" type="bool"/>
+    <field name="Four Components Per Vertex" size="1" start="0:0" type="bool" default="true"/>
+    <field name="Draw Descriptor Is 64b" size="1" start="0:1" type="bool" default="true"/>
     <field name="Occlusion query" size="2" start="0:3" type="Occlusion Mode" default="Disabled"/>
     <field name="Front face CCW" size="1" start="0:5" type="bool"/>
     <field name="Cull front face" size="1" start="0:6" type="bool"/>
index 4fcaa93..e30c3f0 100644 (file)
@@ -955,8 +955,6 @@ pan_preload_emit_dcd(struct pan_pool *pool,
                      void *out, bool always_write)
 {
         pan_pack(out, DRAW, cfg) {
-                cfg.four_components_per_vertex = true;
-                cfg.draw_descriptor_is_64b = true;
                 cfg.thread_storage = tsd;
                 cfg.state = rsd;
 
@@ -999,8 +997,6 @@ pan_blit_emit_dcd(struct pan_pool *pool,
                   void *out)
 {
         pan_pack(out, DRAW, cfg) {
-                cfg.four_components_per_vertex = true;
-                cfg.draw_descriptor_is_64b = true;
                 cfg.thread_storage = tsd;
                 cfg.state = rsd;
 
index 7431061..46cc615 100644 (file)
@@ -451,8 +451,6 @@ panvk_emit_tiler_dcd(const struct panvk_pipeline *pipeline,
                      void *dcd)
 {
    pan_pack(dcd, DRAW, cfg) {
-      cfg.four_components_per_vertex = true;
-      cfg.draw_descriptor_is_64b = true;
       cfg.front_face_ccw = pipeline->rast.front_ccw;
       cfg.cull_front_face = pipeline->rast.cull_front_face;
       cfg.cull_back_face = pipeline->rast.cull_back_face;
index 95aedcd..340d43c 100644 (file)
@@ -282,8 +282,6 @@ panvk_meta_clear_attachment_emit_dcd(struct pan_pool *pool,
                                      void *out)
 {
    pan_pack(out, DRAW, cfg) {
-      cfg.four_components_per_vertex = true;
-      cfg.draw_descriptor_is_64b = true;
       cfg.thread_storage = tsd;
       cfg.state = rsd;
       cfg.push_uniforms = push_constants;
index 1a1fc7e..005077c 100644 (file)
@@ -128,8 +128,6 @@ panvk_meta_copy_emit_dcd(struct pan_pool *pool,
                          void *out)
 {
    pan_pack(out, DRAW, cfg) {
-      cfg.four_components_per_vertex = true;
-      cfg.draw_descriptor_is_64b = true;
       cfg.thread_storage = tsd;
       cfg.state = rsd;
       cfg.uniform_buffers = ubos;