From: Alyssa Rosenzweig Date: Thu, 30 Apr 2020 08:32:11 +0000 (+0200) Subject: panfrost: Update Bifrost fields in mali_shader_meta X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d6588b87bf72fc47a9028b1d03d7ed4c93452193;p=mesa.git panfrost: Update Bifrost fields in mali_shader_meta Not much is known currently about these fields and their values, but this gets things going in the scenarios we have been testing with so far. Signed-off-by: Alyssa Rosenzweig Signed-off-by: Tomeu Vizoso Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index f1e690c72eb..02e15d6c8e5 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -327,9 +327,19 @@ panfrost_shader_meta_init(struct panfrost_context *ctx, meta->sampler_count = ctx->sampler_count[st]; if (dev->quirks & IS_BIFROST) { - meta->bifrost1.unk1 = 0x800200; + if (st == PIPE_SHADER_VERTEX) + meta->bifrost1.unk1 = 0x800000; + else { + /* First clause ATEST |= 0x4000000. + * Less than 32 regs |= 0x200 */ + meta->bifrost1.unk1 = 0x958020; + } + meta->bifrost1.uniform_buffer_count = panfrost_ubo_count(ctx, st); - meta->bifrost2.preload_regs = 0xC0; + if (st == PIPE_SHADER_VERTEX) + meta->bifrost2.preload_regs = 0xC0; + else + meta->bifrost2.preload_regs = 0x1; meta->bifrost2.uniform_count = MIN2(ss->uniform_count, ss->uniform_cutoff); } else { @@ -340,7 +350,6 @@ panfrost_shader_meta_init(struct panfrost_context *ctx, meta->midgard1.flags_lo = 0x220; meta->midgard1.uniform_buffer_count = panfrost_ubo_count(ctx, st); } - } static unsigned