mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
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:
parent
ddd695407e
commit
c6b8591b60
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue