From 4871128e58402385dc6f920884273c003a1124e1 Mon Sep 17 00:00:00 2001 From: Christian König Date: Wed, 25 Sep 2013 13:59:56 +0200 Subject: radeon/winsys: keep screen pointer in winsys v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only create one screen for each winsys instance. This helps with buffer sharing and interop handling. v2: rebased and some minor cleanup Signed-off-by: Christian König Reviewed-by: Marek Olšák --- src/gallium/drivers/r600/r600_pipe.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/drivers/r600') diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 50ff06c9f0d..d86bb18034a 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -958,6 +958,9 @@ static void r600_destroy_screen(struct pipe_screen* pscreen) if (rscreen == NULL) return; + if (!radeon_winsys_unref(rscreen->b.ws)) + return; + pipe_mutex_destroy(rscreen->aux_context_lock); rscreen->aux_context->destroy(rscreen->aux_context); -- cgit v1.2.3