Mesa (main): panfrost: Dirty track stack sizes
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 1 19:26:48 UTC 2021
Module: Mesa
Branch: main
Commit: 8f13eb812db9bc8c871392119eab5908924f9f11
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f13eb812db9bc8c871392119eab5908924f9f11
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu May 20 14:13:07 2021 -0400
panfrost: Dirty track stack sizes
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
---
src/gallium/drivers/panfrost/pan_context.c | 11 +++++------
src/gallium/drivers/panfrost/pan_context.h | 1 +
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index b6f200cc431..7f3e1d37df0 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 033b479a869..9e3f86fb10d 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 {
More information about the mesa-commit
mailing list