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

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


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

diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c
index cccd3b7..3727ac0 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c
@@ -304,6 +304,9 @@ nv50_hw_get_query_result(struct nv50_context *nv50, struct nv50_query *q,
    case PIPE_QUERY_OCCLUSION_COUNTER: /* u32 sequence, u32 count, u64 time */
       res64[0] = hq->data[1] - hq->data[5];
       break;
+   case PIPE_QUERY_OCCLUSION_PREDICATE:
+      res8[0] = hq->data[1] != hq->data[5];
+      break;
    case PIPE_QUERY_PRIMITIVES_GENERATED: /* u64 count, u64 time */
    case PIPE_QUERY_PRIMITIVES_EMITTED: /* u64 count, u64 time */
       res64[0] = data64[0] - data64[2];
-- 
2.4.10



More information about the mesa-dev mailing list