aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_sfbd.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-12-09 11:02:15 -0500
committerAlyssa Rosenzweig <[email protected]>2019-12-13 10:26:35 -0500
commit4f7fddbd7169a2976b56edb39d15c64206e31ebc (patch)
treebfd786b32611c07b38ed12f0fc5456163e97d21b /src/gallium/drivers/panfrost/pan_sfbd.c
parentbc887e82818ac2c8f2011da70d7bddb8975b66c3 (diff)
panfrost: Pass size to panfrost_batch_get_scratchpad
We'll compute the size with the new scratchpad helpers. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_sfbd.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_sfbd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_sfbd.c b/src/gallium/drivers/panfrost/pan_sfbd.c
index ccf23253b51..eb0f24b0a8a 100644
--- a/src/gallium/drivers/panfrost/pan_sfbd.c
+++ b/src/gallium/drivers/panfrost/pan_sfbd.c
@@ -198,9 +198,18 @@ panfrost_sfbd_set_zsbuf(
static struct mali_single_framebuffer
panfrost_emit_sfbd(struct panfrost_batch *batch, unsigned vertex_count)
{
+ struct panfrost_context *ctx = batch->ctx;
+ struct pipe_context *gallium = (struct pipe_context *) ctx;
+ struct panfrost_screen *screen = pan_screen(gallium->screen);
+
unsigned width = batch->key.width;
unsigned height = batch->key.height;
+ /* 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),
@@ -209,7 +218,7 @@ panfrost_emit_sfbd(struct panfrost_batch *batch, unsigned vertex_count)
.unk3 = 0x3,
},
.clear_flags = 0x1000,
- .scratchpad = panfrost_batch_get_scratchpad(batch)->gpu,
+ .scratchpad = panfrost_batch_get_scratchpad(batch, shift, screen->thread_tls_alloc, screen->core_count)->gpu,
.tiler = panfrost_emit_midg_tiler(batch, vertex_count),
};