q->report = 1;
break;
case PIPE_QUERY_OCCLUSION_COUNTER:
+ case PIPE_QUERY_OCCLUSION_PREDICATE:
q->enable = NV30_3D_QUERY_ENABLE;
q->report = 1;
break;
struct nv30_query *q = nv30_query(pq);
volatile uint32_t *ntfy0 = nv30_ntfy(screen, q->qo[0]);
volatile uint32_t *ntfy1 = nv30_ntfy(screen, q->qo[1]);
- uint64_t *res64 = &result->u64;
if (ntfy1) {
while (ntfy1[3] & 0xff000000) {
nv30_query_object_del(screen, &q->qo[1]);
}
- *res64 = q->result;
+ if (q->type == PIPE_QUERY_OCCLUSION_PREDICATE)
+ result->b = !!q->result;
+ else
+ result->u64 = q->result;
return true;
}