Module: Mesa
Branch: master
Commit: 6e75f2172b5cc9298dee6f17e55bed60ce0c15fb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e75f2172b5cc9298dee6f17e55bed60ce0c15fb

Author: Christian Gmeiner <[email protected]>
Date:   Fri Nov 29 09:44:43 2019 +0100

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]>

---

 src/gallium/drivers/etnaviv/etnaviv_context.c | 8 ++++++++
 1 file changed, 8 insertions(+)

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);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to