summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2019-08-01 08:48:56 +0200
committerIago Toral Quiroga <[email protected]>2019-08-08 08:36:52 +0200
commit9eb8699e0f53577f203dc63b01fe18b6a2f61734 (patch)
tree7ac361bd151a46092d49f1ff109f1367275fff81 /src/gallium/drivers/v3d
parent9b316ab57a61dff6f1bcf6df9b0862e6d60733cd (diff)
v3d: be more explicit about the query types supported
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/v3d')
-rw-r--r--src/gallium/drivers/v3d/v3d_query.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gallium/drivers/v3d/v3d_query.c b/src/gallium/drivers/v3d/v3d_query.c
index 31b62461f90..d31b9dd896b 100644
--- a/src/gallium/drivers/v3d/v3d_query.c
+++ b/src/gallium/drivers/v3d/v3d_query.c
@@ -77,14 +77,18 @@ v3d_begin_query(struct pipe_context *pctx, struct pipe_query *query)
case PIPE_QUERY_PRIMITIVES_EMITTED:
q->start = v3d->tf_prims_generated;
break;
- default:
+ case PIPE_QUERY_OCCLUSION_COUNTER:
+ case PIPE_QUERY_OCCLUSION_PREDICATE:
+ case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
q->bo = v3d_bo_alloc(v3d->screen, 4096, "query");
-
uint32_t *map = v3d_bo_map(q->bo);
*map = 0;
+
v3d->current_oq = q->bo;
v3d->dirty |= VC5_DIRTY_OQ;
break;
+ default:
+ unreachable("unsupported query type");
}
return true;
@@ -103,10 +107,14 @@ v3d_end_query(struct pipe_context *pctx, struct pipe_query *query)
case PIPE_QUERY_PRIMITIVES_EMITTED:
q->end = v3d->tf_prims_generated;
break;
- default:
+ case PIPE_QUERY_OCCLUSION_COUNTER:
+ case PIPE_QUERY_OCCLUSION_PREDICATE:
+ case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
v3d->current_oq = NULL;
v3d->dirty |= VC5_DIRTY_OQ;
break;
+ default:
+ unreachable("unsupported query type");
}
return true;