summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Höglund <fredrik@kde.org>2015-05-10 20:57:29 +0200
committerFredrik Höglund <fredrik@kde.org>2015-05-11 18:39:33 +0200
commitb68a86af48cd4d3b393d867b35f7b3eaa1bf407d (patch)
treeaeb50dc730cd9588e0edffd89799fabec642d103
parent038f47a63538313407392987ddbb30251a63ee8c (diff)
mesa: Add ARB_direct_state_access checks in query object functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
-rw-r--r--src/mesa/main/queryobj.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 5ff1b95323..2784b4c053 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: