aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r--mesalib/src/mesa/main/queryobj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c
index 842d8dda5..39c70535a 100644
--- a/mesalib/src/mesa/main/queryobj.c
+++ b/mesalib/src/mesa/main/queryobj.c
@@ -146,11 +146,11 @@ static struct gl_query_object **
get_pipe_stats_binding_point(struct gl_context *ctx,
GLenum target)
{
- if (!_mesa_is_desktop_gl(ctx) ||
+ const int which = target - GL_VERTICES_SUBMITTED_ARB;
+ if (!_mesa_is_desktop_gl(ctx) ||
!ctx->Extensions.ARB_pipeline_statistics_query)
return NULL;
- const int which = target - GL_VERTICES_SUBMITTED_ARB;
assert(which < MAX_PIPELINE_STATISTICS);
return &ctx->Query.pipeline_stats[which];
}