mesa: move declaration before code
authorBrian Paul <brianp@vmware.com>
Fri, 27 Feb 2015 20:05:16 +0000 (13:05 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 27 Feb 2015 22:22:24 +0000 (15:22 -0700)
To fix MinGW warning.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/queryobj.c

index e02969d2ed7dca4aa6b6d6c93fb436d872a14bc3..0842b540de4b38f3c78c55a1a4acd5b171a9abe0 100644 (file)
@@ -146,12 +146,13 @@ static struct gl_query_object **
 get_pipe_stats_binding_point(struct gl_context *ctx,
                              GLenum target)
 {
+   const int which = target - GL_VERTICES_SUBMITTED_ARB;
+   assert(which < MAX_PIPELINE_STATISTICS);
+
    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];
 }