From 49214a3dfc4f5173e22846d92c5dd0c2b24e3638 Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Mon, 19 Jan 2015 16:20:35 +0100 Subject: [PATCH] st/nine: Fix gpu memory leak in swapchain Reviewed-by: Tiziano Bacocco Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/swapchain9.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c index af6fe6e63fa..03ed24ee6c8 100644 --- a/src/gallium/state_trackers/nine/swapchain9.c +++ b/src/gallium/state_trackers/nine/swapchain9.c @@ -338,8 +338,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This, pipe_resource_reference(&(This->present_buffers[i]), resource); } This->present_handles[i] = D3DWindowBuffer_create(This, resource, depth); - if (!has_present_buffers) - pipe_resource_reference(&resource, NULL); + pipe_resource_reference(&resource, NULL); } if (pParams->EnableAutoDepthStencil) { tmplt.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_TRANSFER_READ | -- 2.30.2