llvmpipe: enable PIPE_CAP_QUERY_SO_OVERFLOW
authorRoland Scheidegger <sroland@vmware.com>
Tue, 15 Aug 2017 15:53:49 +0000 (17:53 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 17 Aug 2017 16:46:44 +0000 (18:46 +0200)
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 <jfonseca@vmware.com>
docs/features.txt
src/gallium/drivers/llvmpipe/lp_query.c
src/gallium/drivers/llvmpipe/lp_screen.c

index ace46692b5d817ac24bf1e47f09463ea6f8af1cd..6f57ec26fd18c0407ff5130f29d45f398076d03c 100644 (file)
@@ -232,7 +232,7 @@ GL 4.6, GLSL 4.60
   GL_ARB_shader_group_vote                              DONE (i965, nvc0, radeonsi)
   GL_ARB_spirv_extensions                               in progress (Nicolai Hähnle, Ian Romanick)
   GL_ARB_texture_filter_anisotropic                     not started
-  GL_ARB_transform_feedback_overflow_query              DONE (i965/gen6+, radeonsi, softpipe)
+  GL_ARB_transform_feedback_overflow_query              DONE (i965/gen6+, radeonsi, llvmpipe, softpipe)
   GL_KHR_no_error                                       started (Timothy Arceri)
 
 These are the extensions cherry-picked to make GLES 3.1
index d5ed6561b8c09b604e067c1b6e7abb485ef96b07..6f8ce94e5d8e0700384fbcbd7e24c0d12f0bedc3 100644 (file)
@@ -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 =
index 6c64133b90c4a6bf4587d25658b02f57262df00e..32a405088f98a6020fae06d08be873da2245ff3c 100644 (file)
@@ -270,6 +270,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_DOUBLES:
    case PIPE_CAP_INT64:
    case PIPE_CAP_INT64_DIVMOD:
+   case PIPE_CAP_QUERY_SO_OVERFLOW:
       return 1;
 
    case PIPE_CAP_VENDOR_ID:
@@ -357,7 +358,6 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_POST_DEPTH_COVERAGE:
    case PIPE_CAP_BINDLESS_TEXTURE:
    case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
-   case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_MEMOBJ:
       return 0;
    }