OSDN Git Service

freedreno: mark all state dirty after switching batch
authorRob Clark <robdclark@gmail.com>
Sat, 27 Oct 2018 18:07:09 +0000 (14:07 -0400)
committerRob Clark <robdclark@gmail.com>
Sun, 28 Oct 2018 18:03:38 +0000 (14:03 -0400)
The problem isn't directly with ec717fc629 but rather that commit
exposes the problem.  When we switch batch we cannot assume previous
state is clean so we should mark all state dirty.

Fixes: ec717fc629 freedreno: reduce resource dependency tracking overhead
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_batch.c
src/gallium/drivers/freedreno/freedreno_draw.c

index 91d7ce7..2c5673f 100644 (file)
@@ -369,6 +369,7 @@ fd_batch_flush(struct fd_batch *batch, bool sync, bool force)
 
                fd_batch_reference(&batch, NULL);
                ctx->batch = new_batch;
+               fd_context_all_dirty(ctx);
        }
 
        if (sync)
index 02ea41e..2b5119e 100644 (file)
@@ -490,6 +490,7 @@ fd_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
        batch = fd_bc_alloc_batch(&ctx->screen->batch_cache, ctx, true);
        fd_batch_reference(&save_batch, ctx->batch);
        fd_batch_reference(&ctx->batch, batch);
+       fd_context_all_dirty(ctx);
 
        mtx_lock(&ctx->screen->lock);
 
@@ -533,6 +534,7 @@ fd_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
        fd_batch_flush(batch, false, false);
 
        fd_batch_reference(&ctx->batch, save_batch);
+       fd_context_all_dirty(ctx);
        fd_batch_reference(&save_batch, NULL);
        fd_batch_reference(&batch, NULL);
 }