case PIPE_QUERY_PRIMITIVES_EMITTED:
*result = pq->num_primitives_written;
break;
+ case PIPE_QUERY_SO_STATISTICS: {
+ struct pipe_query_data_so_statistics *stats =
+ (struct pipe_query_data_so_statistics *)vresult;
+ stats->num_primitives_written = pq->num_primitives_written;
+ stats->primitives_storage_needed = pq->num_primitives_generated;
+ }
+ break;
default:
assert(0);
break;
llvmpipe->num_primitives_generated = 0;
}
+ if (pq->type == PIPE_QUERY_SO_STATISTICS) {
+ pq->num_primitives_written = 0;
+ llvmpipe->so_stats.num_primitives_written = 0;
+ pq->num_primitives_generated = 0;
+ llvmpipe->num_primitives_generated = 0;
+ }
+
if (pq->type == PIPE_QUERY_OCCLUSION_COUNTER) {
llvmpipe->active_occlusion_query = TRUE;
llvmpipe->dirty |= LP_NEW_OCCLUSION_QUERY;
pq->num_primitives_generated = llvmpipe->num_primitives_generated;
}
+ if (pq->type == PIPE_QUERY_SO_STATISTICS) {
+ pq->num_primitives_written = llvmpipe->so_stats.num_primitives_written;
+ pq->num_primitives_generated = llvmpipe->num_primitives_generated;
+ }
+
if (pq->type == PIPE_QUERY_OCCLUSION_COUNTER) {
assert(llvmpipe->active_occlusion_query);
llvmpipe->active_occlusion_query = FALSE;
break;
case PIPE_QUERY_PRIMITIVES_GENERATED:
case PIPE_QUERY_PRIMITIVES_EMITTED:
+ case PIPE_QUERY_SO_STATISTICS:
break;
default:
assert(0);
break;
case PIPE_QUERY_PRIMITIVES_GENERATED:
case PIPE_QUERY_PRIMITIVES_EMITTED:
+ case PIPE_QUERY_SO_STATISTICS:
break;
default:
assert(0);