st/nine: Fix gpu memory leak in swapchain

Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
Axel Davy 2015-01-19 16:20:35 +01:00
parent d538007734
commit 49214a3dfc

View file

@ -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 |