pan/bi: Pipe through tls_size
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 15 Oct 2020 00:48:08 +0000 (20:48 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 23 Oct 2020 14:48:23 +0000 (14:48 +0000)
So we have stack memory allocated.

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

src/panfrost/bifrost/bi_ra.c
src/panfrost/bifrost/bifrost_compile.c
src/panfrost/bifrost/compiler.h

index b586969..3d28e15 100644 (file)
@@ -384,6 +384,7 @@ bi_register_allocate(bi_context *ctx)
 
         assert(success);
 
+        ctx->tls_size = spill_count;
         bi_install_registers(ctx, l);
 
         lcra_free(l);
index fc71e5c..99f4a16 100644 (file)
@@ -1966,6 +1966,8 @@ bifrost_compile_shader_nir(void *mem_ctx, nir_shader *nir,
         if (bifrost_debug & BIFROST_DBG_SHADERS)
                 disassemble_bifrost(stdout, program->compiled.data, program->compiled.size, true);
 
+        program->tls_size = ctx->tls_size;
+
         ralloc_free(ctx);
 
         return program;
index 1fc0d03..176f7fd 100644 (file)
@@ -450,6 +450,7 @@ typedef struct {
        struct list_head blocks; /* list of bi_block */
        struct panfrost_sysvals sysvals;
        uint32_t quirks;
+       unsigned tls_size;
 
        /* Is internally a blend shader? Depends on stage == FRAGMENT */
        bool is_blend;