X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmesa%2Fmain%2Fqueryobj.c;h=0842b540de4b38f3c78c55a1a4acd5b171a9abe0;hb=8a25e73df3a38bdbd9e880138edd3000ff54a609;hp=e02969d2ed7dca4aa6b6d6c93fb436d872a14bc3;hpb=dccdf1d687c3abb9a2fc6695c2090f01fdb65997;p=mesa.git diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index e02969d2ed7..0842b540de4 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -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]; }