st/mesa: implement ARB_transform_feedback_overflow_query
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 26 Jul 2017 16:57:56 +0000 (18:57 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 2 Aug 2017 07:46:38 +0000 (09:46 +0200)
v2: update for new cap name

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_cb_queryobj.c
src/mesa/state_tracker/st_extensions.c

index b1ac2aab6dae632c8bfea850ab1f49130828e37c..4c25724b5dc4f87d1e2499ef32da66ef25008234 100644 (file)
@@ -118,7 +118,7 @@ st_BeginQuery(struct gl_context *ctx, struct gl_query_object *q)
       type = PIPE_QUERY_SO_OVERFLOW_PREDICATE;
       break;
    case GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB:
-      type = PIPE_QUERY_SO_OVERFLOW_PREDICATE;
+      type = PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE;
       break;
    case GL_TIME_ELAPSED:
       if (st->has_time_elapsed)
@@ -260,6 +260,8 @@ get_query_result(struct pipe_context *pipe,
    default:
       switch (stq->type) {
       case PIPE_QUERY_OCCLUSION_PREDICATE:
+      case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
+      case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
          stq->base.Result = !!data.b;
          break;
       default:
index 74193cc49285b1520030808f3509d3b0f28c3bf0..8f1676ef41fd478e536d2953ee77a68eb65930ec 100644 (file)
@@ -626,6 +626,7 @@ void st_init_extensions(struct pipe_screen *screen,
       { o(ARB_timer_query),                  PIPE_CAP_QUERY_TIMESTAMP                  },
       { o(ARB_transform_feedback2),          PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME       },
       { o(ARB_transform_feedback3),          PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS },
+      { o(ARB_transform_feedback_overflow_query), PIPE_CAP_QUERY_SO_OVERFLOW           },
 
       { o(KHR_blend_equation_advanced),      PIPE_CAP_TGSI_FS_FBFETCH                  },