gallium/noop: update pipe_screen::num_contexts

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255>
This commit is contained in:
Marek Olšák 2021-08-06 17:59:19 -04:00 committed by Marge Bot
parent ddd695407e
commit c6b8591b60

View file

@ -329,6 +329,7 @@ static void noop_destroy_context(struct pipe_context *ctx)
if (ctx->stream_uploader)
u_upload_destroy(ctx->stream_uploader);
p_atomic_dec(&ctx->screen->num_contexts);
FREE(ctx);
}
@ -429,6 +430,8 @@ static struct pipe_context *noop_create_context(struct pipe_screen *screen,
ctx->set_frontend_noop = noop_set_frontend_noop;
noop_init_state_functions(ctx);
p_atomic_inc(&screen->num_contexts);
if (!(flags & PIPE_CONTEXT_PREFER_THREADED))
return ctx;