llvmpipe: enable support for primitives generated outside streamout
authorDave Airlie <airlied@redhat.com>
Mon, 2 Dec 2019 05:01:06 +0000 (15:01 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 5 Dec 2019 20:48:30 +0000 (06:48 +1000)
This enables the draw support when the queries are enabled.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
.gitlab-ci/piglit/quick_gl.txt
src/gallium/drivers/llvmpipe/lp_context.h
src/gallium/drivers/llvmpipe/lp_draw_arrays.c
src/gallium/drivers/llvmpipe/lp_query.c

index 95e3cb4366f2e9f25840f8d8f314cd62e22fbbc5..e62c7c6f5e0ab11b1e87ec16af80dbb385d25d8e 100644 (file)
@@ -631,18 +631,6 @@ spec/arb_query_buffer_object/qbo/query-gl_compute_shader_invocations-sync-gl_uns
 spec/arb_query_buffer_object/qbo/query-gl_compute_shader_invocations-sync_cpu_read_after_cache_test-gl_int: skip
 spec/arb_query_buffer_object/qbo/query-gl_compute_shader_invocations-sync_cpu_read_after_cache_test-gl_unsigned_int: skip
 spec/arb_query_buffer_object/qbo/query-gl_compute_shader_invocations-sync_cpu_read_after_cache_test-gl_unsigned_int64_arb: skip
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-async_cpu_read_after-gl_int: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-async_cpu_read_after-gl_unsigned_int: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-async_cpu_read_after-gl_unsigned_int64_arb: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-async_cpu_read_before-gl_int: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-async_cpu_read_before-gl_unsigned_int: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-async_cpu_read_before-gl_unsigned_int64_arb: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-sync-gl_int: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-sync-gl_unsigned_int: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-sync-gl_unsigned_int64_arb: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-sync_cpu_read_after_cache_test-gl_int: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-sync_cpu_read_after_cache_test-gl_unsigned_int: fail
-spec/arb_query_buffer_object/qbo/query-gl_primitives_generated-sync_cpu_read_after_cache_test-gl_unsigned_int64_arb: fail
 spec/arb_query_buffer_object/qbo/query-gl_tess_control_shader_patches-async-gl_int: skip
 spec/arb_query_buffer_object/qbo/query-gl_tess_control_shader_patches-async-gl_unsigned_int: skip
 spec/arb_query_buffer_object/qbo/query-gl_tess_control_shader_patches-async-gl_unsigned_int64_arb: skip
@@ -2121,9 +2109,6 @@ spec/ext_texture_srgb/multisample-formats 4 gl_ext_texture_srgb: skip
 spec/ext_texture_srgb/multisample-formats 6 gl_ext_texture_srgb: skip
 spec/ext_texture_srgb/multisample-formats 8 gl_ext_texture_srgb: skip
 spec/ext_timer_query/time-elapsed: fail
-spec/ext_transform_feedback2/counting with pause: fail
-spec/ext_transform_feedback/pipeline-basic-primgen: fail
-spec/ext_transform_feedback/primgen-query transform-feedback-disabled: fail
 spec/ext_transform_feedback/tessellation quad_strip flat_first: warn
 spec/ext_transform_feedback/tessellation quads flat_first: warn
 spec/ext_window_rectangles/dlist/call: skip
@@ -2283,8 +2268,8 @@ wgl/wgl-sanity: skip
 summary:
        name:  results
        ----  --------
-       pass:    17784
-       fail:      233
+       pass:    17799
+       fail:      218
       crash:        2
        skip:     2027
     timeout:        0
index 6ce0454538f5d73add2de543d6d54b6bb5f43e6e..1d36f4968cc640c666cef6a10120dd12b9323597 100644 (file)
@@ -103,6 +103,8 @@ struct llvmpipe_context {
 
    unsigned active_occlusion_queries;
 
+   unsigned active_primgen_queries;
+
    bool queries_disabled;
 
    unsigned dirty; /**< Mask of LP_NEW_x flags */
index 01f3cf3cdfca6ac49eda86c196a476db4435ed66..cf81111b407714cf32a2eb8a1bcfbbd292c423bd 100644 (file)
@@ -122,6 +122,10 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
    draw_collect_pipeline_statistics(draw,
                                     lp->active_statistics_queries > 0);
 
+   draw_collect_primitives_generated(draw,
+                                     lp->active_primgen_queries &&
+                                     !lp->queries_disabled);
+
    /* draw! */
    draw_vbo(draw, info);
 
index a4217368fce315679521f99bdfe50b056c32ce1f..276fd3bab7843d173061a5a982f46482a2ea03fd 100644 (file)
@@ -361,6 +361,7 @@ llvmpipe_begin_query(struct pipe_context *pipe, struct pipe_query *q)
       break;
    case PIPE_QUERY_PRIMITIVES_GENERATED:
       pq->num_primitives_generated = llvmpipe->so_stats.primitives_storage_needed;
+      llvmpipe->active_primgen_queries++;
       break;
    case PIPE_QUERY_SO_STATISTICS:
       pq->num_primitives_written = llvmpipe->so_stats.num_primitives_written;
@@ -408,6 +409,8 @@ llvmpipe_end_query(struct pipe_context *pipe, struct pipe_query *q)
          llvmpipe->so_stats.num_primitives_written - pq->num_primitives_written;
       break;
    case PIPE_QUERY_PRIMITIVES_GENERATED:
+      assert(llvmpipe->active_primgen_queries);
+      llvmpipe->active_primgen_queries--;
       pq->num_primitives_generated =
          llvmpipe->so_stats.primitives_storage_needed - pq->num_primitives_generated;
       break;