panfrost: Use pack for shaderless
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 20 Aug 2020 12:11:04 +0000 (08:11 -0400)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Tue, 25 Aug 2020 15:05:35 +0000 (17:05 +0200)
We'll need a more aggressive refactor for this soon, I think.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>

src/gallium/drivers/panfrost/pan_cmdstream.c

index 46aeed0595919f7b607311012b68846adf280ac0..c206687960fe71fa45315a70fc02330aa5837e2e 100644 (file)
@@ -680,9 +680,15 @@ panfrost_emit_frag_shader(struct panfrost_context *ctx,
                 fragmeta->sampler_count = 0;
 
                 /* This feature is not known to work on Bifrost */
-                fragmeta->midgard1.work_count = 1;
-                fragmeta->midgard1.uniform_count = 0;
-                fragmeta->midgard1.uniform_buffer_count = 0;
+                struct mali_midgard_properties_packed prop;
+
+                pan_pack(&prop, MIDGARD_PROPERTIES, cfg) {
+                        cfg.work_register_count = 1;
+                        cfg.depth_source = MALI_DEPTH_SOURCE_FIXED_FUNCTION;
+                        cfg.early_z_enable = true;
+                }
+
+                memcpy(&fragmeta->midgard1, &prop, sizeof(prop));
         }
 
          /* If there is a blend shader, work registers are shared. We impose 8