From: Fredrik Höglund Date: Sun, 10 May 2015 18:57:29 +0000 (+0200) Subject: mesa: Add ARB_direct_state_access checks in query object functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d3368e0c9e27ced6059eb2ecdf2aa999a00e90b0;p=mesa.git mesa: Add ARB_direct_state_access checks in query object functions Signed-off-by: Fredrik Höglund Reviewed-by: Adam Jackson --- diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index 5ff1b953231..2784b4c0532 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -284,6 +284,13 @@ _mesa_CreateQueries(GLenum target, GLsizei n, GLuint *ids) { GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glCreateQueries(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + switch (target) { case GL_SAMPLES_PASSED: case GL_ANY_SAMPLES_PASSED: