aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2018-04-05 22:31:25 +0100
committerIlia Mirkin <[email protected]>2018-04-07 16:45:00 -0400
commit98d15e0550d16afdb41e115b86f5cac8439f1ca7 (patch)
treeb29aec6122667917cab14aba053c2732c3efc7c9 /src/gallium/drivers/nouveau
parent90bb2d7152ba63e1592e3c1aabc69386a10f2d89 (diff)
nvc0: ensure the query's fence has been emitted in nvc0_hw_query_fifo_wait
If the fence has not been emitted, hq->fence->sequence would be zero. This would result in the semaphore never being triggered, blocking all later commands in the pushbuf. Signed-off-by: Rhys Perry <[email protected]> [imirkin: use nouveau_fence_emit instead] Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c
index 83a57fa0118..8ff3572c5cb 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c
@@ -611,6 +611,10 @@ nvc0_hw_query_fifo_wait(struct nvc0_context *nvc0, struct nvc0_query *q)
struct nvc0_hw_query *hq = nvc0_hw_query(q);
unsigned offset = hq->offset;
+ /* ensure the query's fence has been emitted */
+ if (hq->is64bit && hq->fence->state < NOUVEAU_FENCE_STATE_EMITTED)
+ nouveau_fence_emit(hq->fence);
+
if (q->type == PIPE_QUERY_SO_OVERFLOW_PREDICATE) offset += 0x20;
PUSH_SPACE(push, 5);