panfrost: Calculate maximum stack_size per batch
We'll need this so we can allocate a stack for the batch large enough for all the jobs within it. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
@@ -1265,6 +1265,16 @@ panfrost_queue_draw(struct panfrost_context *ctx)
|
||||
panfrost_scoreboard_queue_fused_job_prepend(batch, vertex, tiler);
|
||||
else
|
||||
panfrost_scoreboard_queue_fused_job(batch, vertex, tiler);
|
||||
|
||||
for (unsigned i = 0; i < PIPE_SHADER_TYPES; ++i) {
|
||||
struct panfrost_shader_variants *all = ctx->shader[i];
|
||||
|
||||
if (!all)
|
||||
continue;
|
||||
|
||||
struct panfrost_shader_state *ss = &all->variants[all->active_variant];
|
||||
batch->stack_size = MAX2(batch->stack_size, ss->stack_size);
|
||||
}
|
||||
}
|
||||
|
||||
/* The entire frame is in memory -- send it off to the kernel! */
|
||||
|
||||
@@ -83,6 +83,9 @@ struct panfrost_batch {
|
||||
float clear_depth;
|
||||
unsigned clear_stencil;
|
||||
|
||||
/* Amount of thread local storage required per thread */
|
||||
unsigned stack_size;
|
||||
|
||||
/* Whether this job uses the corresponding requirement (PAN_REQ_*
|
||||
* bitmask) */
|
||||
unsigned requirements;
|
||||
|
||||
Reference in New Issue
Block a user