panfrost: Specify stack_shift on SFBD
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 30 Jun 2020 17:20:56 +0000 (13:20 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 2 Jul 2020 17:37:10 +0000 (13:37 -0400)
Fixes spilling on T720.

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

src/gallium/drivers/panfrost/pan_sfbd.c

index a163fa9b6a61221ff508ecca27fcbbd82ee69f63..7579c4608f9c06b52aea8d20b5dcd7f62c0ac0a2 100644 (file)
@@ -204,12 +204,11 @@ panfrost_emit_sfbd(struct panfrost_batch *batch, unsigned vertex_count)
         /* TODO: Why do we need to make the stack bigger than other platforms? */
         unsigned shift = panfrost_get_stack_shift(MAX2(batch->stack_size, 512));
 
-        /* TODO: where do we specify the shift? */
-
         struct mali_single_framebuffer framebuffer = {
                 .width = MALI_POSITIVE(width),
                 .height = MALI_POSITIVE(height),
                 .shared_memory = {
+                        .stack_shift = shift,
                         .shared_workgroup_count = ~0,
                         .scratchpad = panfrost_batch_get_scratchpad(batch, shift, dev->thread_tls_alloc, dev->core_count)->gpu,
                 },