[Mesa-dev] [PATCH 05/13] mesa/main: fix validation of GL_SAMPLES_PASSED

Erik Faye-Lund erik.faye-lund at collabora.com
Wed Nov 7 15:58:29 UTC 2018


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

This turns usage of GL_SAMPLES_PASSED into an error on ES 3, as is
required by the spec.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
---
 src/mesa/main/queryobj.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 96b1c6bb30a..74977210f2d 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -179,7 +179,7 @@ get_query_binding_point(struct gl_context *ctx, GLenum target, GLuint index)
 
    switch (target) {
    case GL_SAMPLES_PASSED:
-      if (ctx->Extensions.ARB_occlusion_query)
+      if (_mesa_has_ARB_occlusion_query(ctx))
          return &ctx->Query.CurrentOcclusionObject;
       else
          return NULL;
-- 
2.19.1



More information about the mesa-dev mailing list