+ if (pq->type == PIPE_QUERY_PRIMITIVES_EMITTED) {
+ pq->num_primitives_written = llvmpipe->so_stats.num_primitives_written;
+ }
+
+ if (pq->type == PIPE_QUERY_PRIMITIVES_GENERATED) {
+ 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_PIPELINE_STATISTICS) {
+ pq->stats.ia_vertices =
+ llvmpipe->pipeline_statistics.ia_vertices - pq->stats.ia_vertices;
+ pq->stats.ia_primitives =
+ llvmpipe->pipeline_statistics.ia_primitives - pq->stats.ia_primitives;
+ pq->stats.vs_invocations =
+ llvmpipe->pipeline_statistics.vs_invocations - pq->stats.vs_invocations;
+ pq->stats.gs_invocations =
+ llvmpipe->pipeline_statistics.gs_invocations - pq->stats.gs_invocations;
+ pq->stats.gs_primitives =
+ llvmpipe->pipeline_statistics.gs_primitives - pq->stats.gs_primitives;
+ pq->stats.c_invocations =
+ llvmpipe->pipeline_statistics.c_invocations - pq->stats.c_invocations;
+ pq->stats.c_primitives =
+ llvmpipe->pipeline_statistics.c_primitives - pq->stats.c_primitives;
+ pq->stats.ps_invocations =
+ llvmpipe->pipeline_statistics.ps_invocations - pq->stats.ps_invocations;
+
+ llvmpipe->active_statistics_queries--;
+ }
+
+ if (pq->type == PIPE_QUERY_OCCLUSION_COUNTER) {
+ assert(llvmpipe->active_occlusion_query);
+ llvmpipe->active_occlusion_query = FALSE;
+ llvmpipe->dirty |= LP_NEW_OCCLUSION_QUERY;
+ }