broadcom/vc5: Don't increment primitive queries while they're paused.
authorEric Anholt <eric@anholt.net>
Tue, 21 Nov 2017 23:27:20 +0000 (15:27 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 22 Nov 2017 18:56:31 +0000 (10:56 -0800)
Fixes ext_transform_feedback-generatemipmap prims_generated

src/gallium/drivers/vc5/vc5_draw.c

index c4f73f65dc4ef1dbe54e795100e33bdfa20f3909..6ca6966f713c669e2f26f7151a6e0f804f9f4a24 100644 (file)
@@ -279,8 +279,10 @@ vc5_tf_statistics_record(struct vc5_context *vc5,
                          const struct pipe_draw_info *info,
                          bool prim_tf)
 {
-        uint32_t prims = u_prims_for_vertices(info->mode, info->count);
+        if (!vc5->active_queries)
+                return;
 
+        uint32_t prims = u_prims_for_vertices(info->mode, info->count);
         vc5->prims_generated += prims;
 
         if (prim_tf) {