st/mesa: fix PRIMITIVES_GENERATED query after the "pipeline stat single" changes
authorMarek Olšák <marek.olsak@amd.com>
Fri, 18 Jan 2019 16:25:06 +0000 (11:25 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 23 Jan 2019 19:32:57 +0000 (14:32 -0500)
When this functionality was added, the PRIMITIVES_GENERATED query was
accidentally omitted. This causes issues for drivers that support
transform feedback."

Fixes: d644698b443 ("gallium: Add the ability to query a single
pipeline statistics counter")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/state_tracker/st_cb_queryobj.c

index abb126547c9b719194937f43b3ea9c97396bbf94..642b901d05adff94754a85a32a47ed0bde9e6074 100644 (file)
@@ -91,7 +91,8 @@ st_DeleteQuery(struct gl_context *ctx, struct gl_query_object *q)
 static int
 target_to_index(const struct st_context *st, const struct gl_query_object *q)
 {
-   if (q->Target == GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN ||
+   if (q->Target == GL_PRIMITIVES_GENERATED ||
+       q->Target == GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN ||
        q->Target == GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB)
       return q->Stream;