[Mesa-dev] [PATCH 2/3] nv30: add PIPE_QUERY_OCCLUSION_PREDICATE support

Ilia Mirkin imirkin at alum.mit.edu
Thu Feb 4 17:52:16 UTC 2016


Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 src/gallium/drivers/nouveau/nv30/nv30_query.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nv30/nv30_query.c b/src/gallium/drivers/nouveau/nv30/nv30_query.c
index 3980be9..608df01 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_query.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_query.c
@@ -120,6 +120,7 @@ nv30_query_create(struct pipe_context *pipe, unsigned type, unsigned index)
       q->report = 1;
       break;
    case PIPE_QUERY_OCCLUSION_COUNTER:
+   case PIPE_QUERY_OCCLUSION_PREDICATE:
       q->enable = NV30_3D_QUERY_ENABLE;
       q->report = 1;
       break;
@@ -218,6 +219,9 @@ nv30_query_result(struct pipe_context *pipe, struct pipe_query *pq,
       case PIPE_QUERY_TIME_ELAPSED:
          q->result = *(uint64_t *)&ntfy1[0] - *(uint64_t *)&ntfy0[0];
          break;
+      case PIPE_QUERY_OCCLUSION_PREDICATE:
+         q->result = !!ntfy[2];
+         break;
       default:
          q->result = ntfy1[2];
          break;
-- 
2.4.10



More information about the mesa-dev mailing list