summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_context.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-04-02 20:48:44 -0400
committerRob Clark <[email protected]>2015-04-05 16:36:34 -0400
commitdacf22e0a34d4dc2595f3cb0dbee52318dc9d0d7 (patch)
tree1edadeb6b96f00a49c0fec986619f8c670fc85bc /src/gallium/drivers/freedreno/freedreno_context.c
parent2e1445c8f3df7608ba4522f8d088170de4ec788c (diff)
freedreno: mark resources as being read so that writes flush the queue
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index bb1b52797a8..5fca57c5a3a 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -95,6 +95,7 @@ fd_context_render(struct pipe_context *pctx)
{
struct fd_context *ctx = fd_context(pctx);
struct pipe_framebuffer_state *pfb = &ctx->framebuffer;
+ struct fd_resource *rsc, *rsc_tmp;
int i;
DBG("needs_flush: %d", ctx->needs_flush);
@@ -122,6 +123,15 @@ fd_context_render(struct pipe_context *pctx)
fd_resource(pfb->cbufs[i]->texture)->dirty = false;
if (pfb->zsbuf)
fd_resource(pfb->zsbuf->texture)->dirty = false;
+
+ /* go through all the used resources and clear their reading flag */
+ LIST_FOR_EACH_ENTRY_SAFE(rsc, rsc_tmp, &ctx->used_resources, list) {
+ assert(rsc->reading);
+ rsc->reading = false;
+ list_delinit(&rsc->list);
+ }
+
+ assert(LIST_IS_EMPTY(&ctx->used_resources));
}
static void