summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2018-11-07 13:45:17 +0100
committerErik Faye-Lund <[email protected]>2018-11-23 10:48:36 +0100
commit7a4d74c35abec0f8c9c2b8c0d810035582db2dc8 (patch)
treee524af6931cae4e3663baca92df975cd87b0da70 /src/mesa
parent75e39b59dc3b2222b5611b516ef4d8ea7f8d14f9 (diff)
mesa/main: fix validation of ARB_query_buffer_object
ctx->Extensions.ARB_query_buffer_object is set based on the driver- capabilities, not based on the context type. We need to check against _mesa_has_ARB_query_buffer_object(ctx) instead to figure out if the extension is really supported. This turns attempts to read queries into buffer objects on ES 3 into errors, as required by the spec. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/queryobj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 45db43139a4..c86b9ec065b 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -825,7 +825,7 @@ get_query_object(struct gl_context *ctx, const char *func,
if (buf && buf != ctx->Shared->NullBufferObj) {
bool is_64bit = ptype == GL_INT64_ARB ||
ptype == GL_UNSIGNED_INT64_ARB;
- if (!ctx->Extensions.ARB_query_buffer_object) {
+ if (!_mesa_has_ARB_query_buffer_object(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(not supported)", func);
return;
}
@@ -858,7 +858,7 @@ get_query_object(struct gl_context *ctx, const char *func,
value = q->Result;
break;
case GL_QUERY_RESULT_NO_WAIT:
- if (!ctx->Extensions.ARB_query_buffer_object)
+ if (!_mesa_has_ARB_query_buffer_object(ctx))
goto invalid_enum;
ctx->Driver.CheckQuery(ctx, q);
if (!q->Ready)