Mesa (master): mesa/main: fix validation of GL_ANY_SAMPLES_PASSED

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


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Nov  7 13:22:41 2018 +0100

mesa/main: fix validation of GL_ANY_SAMPLES_PASSED

ctx->Extensions.ARB_occlusion_query2 is set based on the driver-
capabilities, not based on the context type. We need to check against
_mesa_has_ARB_occlusion_query2(ctx) instead to figure out if the
extension is really supported.

In addition, EXT_occlusion_query_boolean should also allow this
behavior.

This shouldn't cause any functional change, as all drivers that support
ARB_occlusion_query2 should in practice enable either
ARB_occlusion_query2 or EXT_occlusion_query_boolean under all APIs that
export this symbol.

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 4c8e4df98b..25d76a4864 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -185,7 +185,8 @@ get_query_binding_point(struct gl_context *ctx, GLenum target, GLuint index)
       else
          return NULL;
    case GL_ANY_SAMPLES_PASSED:
-      if (ctx->Extensions.ARB_occlusion_query2)
+      if (_mesa_has_ARB_occlusion_query2(ctx) ||
+          _mesa_has_EXT_occlusion_query_boolean(ctx))
          return &ctx->Query.CurrentOcclusionObject;
       else
          return NULL;




More information about the mesa-commit mailing list