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>
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;