diff options
author | Ilia Mirkin <[email protected]> | 2015-04-02 20:48:44 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-04-05 16:36:34 -0400 |
commit | dacf22e0a34d4dc2595f3cb0dbee52318dc9d0d7 (patch) | |
tree | 1edadeb6b96f00a49c0fec986619f8c670fc85bc /src/gallium/drivers/freedreno/freedreno_resource.c | |
parent | 2e1445c8f3df7608ba4522f8d088170de4ec788c (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_resource.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_resource.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 6e7958d42dd..000d1c210af 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -57,7 +57,8 @@ realloc_bo(struct fd_resource *rsc, uint32_t size) rsc->bo = fd_bo_new(screen->dev, size, flags); rsc->timestamp = 0; - rsc->dirty = false; + rsc->dirty = rsc->reading = false; + list_delinit(&rsc->list); } static void fd_resource_transfer_flush_region(struct pipe_context *pctx, @@ -170,6 +171,7 @@ fd_resource_destroy(struct pipe_screen *pscreen, struct fd_resource *rsc = fd_resource(prsc); if (rsc->bo) fd_bo_del(rsc->bo); + list_delinit(&rsc->list); FREE(rsc); } @@ -277,6 +279,7 @@ fd_resource_create(struct pipe_screen *pscreen, *prsc = *tmpl; pipe_reference_init(&prsc->reference, 1); + list_inithead(&rsc->list); prsc->screen = pscreen; rsc->base.vtbl = &fd_resource_vtbl; @@ -340,6 +343,7 @@ fd_resource_from_handle(struct pipe_screen *pscreen, *prsc = *tmpl; pipe_reference_init(&prsc->reference, 1); + list_inithead(&rsc->list); prsc->screen = pscreen; rsc->bo = fd_screen_bo_from_handle(pscreen, handle, &slice->pitch); |