Mesa (master): mesa/main: fix validation of transform-feedback overflow queries

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 23 09:48:59 UTC 2018


Module: Mesa
Branch: master
Commit: 75e39b59dc3b2222b5611b516ef4d8ea7f8d14f9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=75e39b59dc3b2222b5611b516ef4d8ea7f8d14f9

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Nov  7 16:00:59 2018 +0100

mesa/main: fix validation of transform-feedback overflow queries

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 at collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.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 bda94ccc70..45db43139a 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -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;




More information about the mesa-commit mailing list