summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_query.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2017-08-15 17:53:49 +0200
committerRoland Scheidegger <[email protected]>2017-08-17 18:46:44 +0200
commit3e9623145760883b431c0902b198d71d003ef7a0 (patch)
tree421be72db11775f81ad0aeb0e67de40ea5a04b38 /src/gallium/drivers/llvmpipe/lp_query.c
parent26d46b94b4f03a8a5203539949e19124e3cdefad (diff)
llvmpipe: enable PIPE_CAP_QUERY_SO_OVERFLOW
The driver supported this since way before the GL spec for it existed. Just need to support both the per-stream and for all streams variants (which are identical due to only supporting 1 stream). Passes piglit arb_transform_feedback_overflow_query-basic. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_query.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_query.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c
index d5ed6561b8c..6f8ce94e5d8 100644
--- a/src/gallium/drivers/llvmpipe/lp_query.c
+++ b/src/gallium/drivers/llvmpipe/lp_query.c
@@ -155,6 +155,7 @@ llvmpipe_get_query_result(struct pipe_context *pipe,
*result = pq->num_primitives_written;
break;
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
+ case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
vresult->b = pq->num_primitives_generated > pq->num_primitives_written;
break;
case PIPE_QUERY_SO_STATISTICS: {
@@ -215,6 +216,7 @@ llvmpipe_begin_query(struct pipe_context *pipe, struct pipe_query *q)
pq->num_primitives_generated = llvmpipe->so_stats.primitives_storage_needed;
break;
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
+ case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
pq->num_primitives_written = llvmpipe->so_stats.num_primitives_written;
pq->num_primitives_generated = llvmpipe->so_stats.primitives_storage_needed;
break;
@@ -264,6 +266,7 @@ llvmpipe_end_query(struct pipe_context *pipe, struct pipe_query *q)
llvmpipe->so_stats.primitives_storage_needed - pq->num_primitives_generated;
break;
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
+ case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
pq->num_primitives_written =
llvmpipe->so_stats.num_primitives_written - pq->num_primitives_written;
pq->num_primitives_generated =