summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@collabora.com>2021-05-19 14:27:08 -0400
committerMarge Bot <eric+marge@anholt.net>2021-05-21 14:23:17 +0000
commit9aaf1504995b880a7245c72e3358c78b82b268f8 (patch)
treed931c187648aeb82b5ed77ddf1e9c5a29c16440e
parenta4b0da78bbb2ed27e068135901a294640f3b8d0c (diff)
panfrost: Dirty all state when batch is set
State uploads are bound to the batch, so if the batch changes, we invalidate all state. Theoretically this isn't totally optimal but in practice it should be good enough. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10888>
-rw-r--r--src/gallium/drivers/panfrost/pan_job.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index c008ca78482..af3f9a235ba 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -192,6 +192,8 @@ panfrost_get_fresh_batch(struct panfrost_context *ctx,
{
struct panfrost_batch *batch = panfrost_get_batch(ctx, key);
+ panfrost_dirty_state_all(ctx);
+
/* The batch has no draw/clear queued, let's return it directly.
* Note that it's perfectly fine to re-use a batch with an
* existing clear, we'll just update it with the new clear request.
@@ -230,6 +232,7 @@ panfrost_get_batch_for_fbo(struct panfrost_context *ctx)
* FB state and when submitting or releasing a job.
*/
ctx->batch = batch;
+ panfrost_dirty_state_all(ctx);
return batch;
}
@@ -239,6 +242,7 @@ panfrost_get_fresh_batch_for_fbo(struct panfrost_context *ctx)
struct panfrost_batch *batch;
batch = panfrost_get_batch(ctx, &ctx->pipe_framebuffer);
+ panfrost_dirty_state_all(ctx);
/* The batch has no draw/clear queued, let's return it directly.
* Note that it's perfectly fine to re-use a batch with an