Mesa (main): gallium/noop: update pipe_screen::num_contexts

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 9 13:14:25 UTC 2021


Module: Mesa
Branch: main
Commit: c6b8591b608686fac1b7855e4827302e906210ca
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c6b8591b608686fac1b7855e4827302e906210ca

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Aug  6 17:59:19 2021 -0400

gallium/noop: update pipe_screen::num_contexts

Acked-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12255>

---

 src/gallium/auxiliary/driver_noop/noop_pipe.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/auxiliary/driver_noop/noop_pipe.c b/src/gallium/auxiliary/driver_noop/noop_pipe.c
index 65d2b099098..ae146bb4724 100644
--- a/src/gallium/auxiliary/driver_noop/noop_pipe.c
+++ b/src/gallium/auxiliary/driver_noop/noop_pipe.c
@@ -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;
 



More information about the mesa-commit mailing list