mesa/main: fix validation of transform-feedback overflow queries
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 7 Nov 2018 15:00:59 +0000 (16:00 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 23 Nov 2018 09:48:36 +0000 (10:48 +0100)
ctx->Extensions.ARB_transform_feedback_overflow_query is set based on
the driver-capabilities, not based on the context type. We need to
check against _mesa_has_RB_transform_feedback_overflow_query(ctx)
instead to figure out if the extension is really supported.

This turns usage of GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW and
GL_TRANSFORM_FEEDBACK_OVERFLOW into errors on ES 3, as required by the
spec.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/queryobj.c

index bda94ccc7017cf098ce1e0f06cd91fb30cb915f4..45db43139a4b7682ebe40611a10fcf852bc48f3e 100644 (file)
@@ -214,12 +214,12 @@ get_query_binding_point(struct gl_context *ctx, GLenum target, GLuint index)
       else
          return NULL;
    case GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW:
-      if (ctx->Extensions.ARB_transform_feedback_overflow_query)
+      if (_mesa_has_ARB_transform_feedback_overflow_query(ctx))
          return &ctx->Query.TransformFeedbackOverflow[index];
       else
          return NULL;
    case GL_TRANSFORM_FEEDBACK_OVERFLOW:
-      if (ctx->Extensions.ARB_transform_feedback_overflow_query)
+      if (_mesa_has_ARB_transform_feedback_overflow_query(ctx))
          return &ctx->Query.TransformFeedbackOverflowAny;
       else
          return NULL;