diff options
author | Christian Gmeiner <[email protected]> | 2019-11-29 09:44:43 +0100 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2019-12-20 12:43:23 +0100 |
commit | 6e75f2172b5cc9298dee6f17e55bed60ce0c15fb (patch) | |
tree | 7e12a77c20d0bc478a901a616d1279b1bff552b8 /src/gallium | |
parent | cabcbb4db0fcc6bc204169b1ba0deca4561e67ee (diff) |
etnaviv: update resource status after flushing
Currently piglit spec@arb_occlusion_query@occlusion_query_conform
spins for ever as the resource status is never reset. See
etna_hw_get_query_result(..) for more details.
Fixes: 1456aa61cc5 ("etnaviv: Rework resource status tracking")
CC: <[email protected]>
Signed-off-by: Christian Gmeiner <[email protected]>
Tested-by: Marek Vasut <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_context.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c index 5f455c4412a..5652107f4dc 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_context.c +++ b/src/gallium/drivers/etnaviv/etnaviv_context.c @@ -460,6 +460,10 @@ etna_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, _mesa_set_remove_key(rsc->pending_ctx, ctx); + /* if resource has no pending ctx's reset its status */ + if (_mesa_set_next_entry(rsc->pending_ctx, NULL) == NULL) + rsc->status &= ~ETNA_PENDING_READ; + pipe_resource_reference(&referenced, NULL); } _mesa_set_clear(ctx->used_resources_read, NULL); @@ -470,6 +474,10 @@ etna_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, _mesa_set_remove_key(rsc->pending_ctx, ctx); + /* if resource has no pending ctx's reset its status */ + if (_mesa_set_next_entry(rsc->pending_ctx, NULL) == NULL) + rsc->status &= ~ETNA_PENDING_WRITE; + pipe_resource_reference(&referenced, NULL); } _mesa_set_clear(ctx->used_resources_write, NULL); |