nv50,nvc0: Mark PIPE_QUERY_TIMESTAMP_DISJOINT as ready immediately
authorTiziano Bacocco <tizbac2@gmail.com>
Fri, 6 Feb 2015 18:03:41 +0000 (19:03 +0100)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 10 Feb 2015 13:02:17 +0000 (08:02 -0500)
Without this when an application issues that query, it would try to
wait the result from the gpu, and since no query has been actually
issued, it will wait forever.

Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_query.c
src/gallium/drivers/nouveau/nvc0/nvc0_query.c

index e0671ce537591d50cd1b19d14bd42b23762333ff..b9c7d1e1dca71f9cd40d9aa560e16c2ef0a3525a 100644 (file)
@@ -231,6 +231,8 @@ nv50_query_end(struct pipe_context *pipe, struct pipe_query *pq)
       nv50_query_get(push, q, 0, 0x0d005002 | (q->index << 5));
       break;
    case PIPE_QUERY_TIMESTAMP_DISJOINT:
+      /* This query is not issued on GPU because disjoint is forced to FALSE */
+      q->ready = TRUE;
       break;
    default:
       assert(0);
index 3a6df9dcf87aed3ad29a64610e9fd685719a724a..ec464b51a710a68ddf818577bbce974d47ae6051 100644 (file)
@@ -397,6 +397,10 @@ nvc0_query_end(struct pipe_context *pipe, struct pipe_query *pq)
       /* indexed by TFB buffer instead of by vertex stream */
       nvc0_query_get(push, q, 0x00, 0x0d005002 | (q->index << 5));
       break;
+   case PIPE_QUERY_TIMESTAMP_DISJOINT:
+      /* This query is not issued on GPU because disjoint is forced to FALSE */
+      q->state = NVC0_QUERY_STATE_READY;
+      break;
    default:
 #ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS
       if (q->type >= NVC0_QUERY_DRV_STAT(0) &&