From: Axel Davy Date: Mon, 19 Jan 2015 15:20:35 +0000 (+0100) Subject: st/nine: Fix gpu memory leak in swapchain X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=49214a3dfc4f5173e22846d92c5dd0c2b24e3638;p=mesa.git st/nine: Fix gpu memory leak in swapchain Reviewed-by: Tiziano Bacocco Signed-off-by: Axel Davy --- 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 |