From: Alyssa Rosenzweig Date: Thu, 20 Aug 2020 12:11:04 +0000 (-0400) Subject: panfrost: Use pack for shaderless X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=41aad9aff9d72b5ea4228b58872407ea22d2dca9;p=mesa.git panfrost: Use pack for shaderless We'll need a more aggressive refactor for this soon, I think. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Tomeu Vizoso Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 46aeed05959..c206687960f 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -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