ctx->Extensions.EXT_transform_feedback is set based on the driver- capabilities, not based on the context type. We need to check against _mesa_has_EXT_transform_feedback(ctx) instead to figure out if the extension is really supported.
This turns usage of GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN into an error on ES 2, as well as usage of GL_PRIMITIVES_GENERATED on ES 3, both as required by the spec. Signed-off-by: Erik Faye-Lund <erik.faye-l...@collabora.com> --- src/mesa/main/queryobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index e4185073e3b..ce3ae3401b7 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -201,12 +201,12 @@ get_query_binding_point(struct gl_context *ctx, GLenum target, GLuint index) else return NULL; case GL_PRIMITIVES_GENERATED: - if (ctx->Extensions.EXT_transform_feedback) + if (_mesa_has_EXT_transform_feedback(ctx)) return &ctx->Query.PrimitivesGenerated[index]; else return NULL; case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: - if (ctx->Extensions.EXT_transform_feedback) + if (_mesa_has_EXT_transform_feedback(ctx) || _mesa_is_gles3(ctx)) return &ctx->Query.PrimitivesWritten[index]; else return NULL; -- 2.19.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev