From: Alyssa Rosenzweig Date: Thu, 20 May 2021 18:13:07 +0000 (-0400) Subject: panfrost: Dirty track stack sizes X-Git-Tag: upstream/21.2.3~2645 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f13eb812db9bc8c871392119eab5908924f9f11;p=platform%2Fupstream%2Fmesa.git panfrost: Dirty track stack sizes Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index b6f200c..7f3e1d3 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -319,6 +319,9 @@ panfrost_update_state_3d(struct panfrost_batch *batch) if (dirty & (PAN_DIRTY_VIEWPORT | PAN_DIRTY_SCISSOR)) batch->viewport = panfrost_emit_viewport(batch); + + if (dirty & PAN_DIRTY_TLS_SIZE) + panfrost_batch_adjust_stack_size(batch); } static void @@ -580,9 +583,6 @@ panfrost_direct_draw(struct panfrost_batch *batch, fs_vary, varyings, pos, psiz, tiler.cpu); panfrost_emit_vertex_tiler_jobs(batch, &vertex, &tiler); - /* Adjust the batch stack size based on the new shader stack sizes. */ - panfrost_batch_adjust_stack_size(batch); - /* Increment transform feedback offsets */ panfrost_update_streamout_offsets(ctx); } @@ -729,9 +729,6 @@ panfrost_indirect_draw(struct panfrost_batch *batch, &batch->indirect_draw_ctx); panfrost_emit_vertex_tiler_jobs(batch, &vertex, &tiler); - - /* Adjust the batch stack size based on the new shader stack sizes. */ - panfrost_batch_adjust_stack_size(batch); } static void @@ -1123,6 +1120,8 @@ panfrost_bind_shader_state( struct panfrost_context *ctx = pan_context(pctx); struct panfrost_device *dev = pan_device(ctx->base.screen); ctx->shader[type] = hwcso; + + ctx->dirty |= PAN_DIRTY_TLS_SIZE; ctx->dirty_shader[type] |= PAN_DIRTY_STAGE_RENDERER; if (!hwcso) return; diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index 033b479..9e3f86f 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -68,6 +68,7 @@ enum pan_dirty_3d { PAN_DIRTY_VERTEX = BITFIELD_BIT(2), PAN_DIRTY_PARAMS = BITFIELD_BIT(3), PAN_DIRTY_DRAWID = BITFIELD_BIT(4), + PAN_DIRTY_TLS_SIZE = BITFIELD_BIT(5), }; enum pan_dirty_shader {