[Mesa-dev] [PATCH 66/84] st/nine: Detach buffers in swapchain dtor.

Axel Davy axel.davy at ens.fr
Wed Dec 7 22:55:39 UTC 2016


BackBuffers can survive swapchain dtor if
the user has a reference on them.

The swapchain itself has no reference on the buffer.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/swapchain9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c
index 75e0345..6fb3dfc 100644
--- a/src/gallium/state_trackers/nine/swapchain9.c
+++ b/src/gallium/state_trackers/nine/swapchain9.c
@@ -508,7 +508,7 @@ NineSwapChain9_dtor( struct NineSwapChain9 *This )
 
     for (i = 0; i < This->num_back_buffers; i++) {
         if (This->buffers[i])
-            NineUnknown_Release(NineUnknown(This->buffers[i]));
+            NineUnknown_Detach(NineUnknown(This->buffers[i]));
         if (This->present_handles[i])
             ID3DPresent_DestroyD3DWindowBuffer(This->present, This->present_handles[i]);
         if (This->present_buffers[i])
-- 
2.10.2



More information about the mesa-dev mailing list