[Mesa-stable] [PATCH 10/53] st/nine: Fix crash when deleting non-implicit swapchain
Axel Davy
axel.davy at ens.fr
Wed Jan 7 08:36:20 PST 2015
The implicit swapchains are destroyed when the device instance is
destroyed. However for non-implicit swapchains, it is not the case,
and the application can have kept an reference on the swapchain
buffers to reuse them.
Fixes problems with battle.net launcher.
Cc: "10.4" <mesa-stable at lists.freedesktop.org>
Tested-by: Nick Sarnie <commendsarnex at gmail.com>
Reviewed-by: David Heidelberg <david at ixit.cz>
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 bf87aaf..24ff905 100644
--- a/src/gallium/state_trackers/nine/swapchain9.c
+++ b/src/gallium/state_trackers/nine/swapchain9.c
@@ -467,7 +467,7 @@ NineSwapChain9_dtor( struct NineSwapChain9 *This )
if (This->buffers) {
for (i = 0; i < This->params.BackBufferCount; i++) {
- NineUnknown_Destroy(NineUnknown(This->buffers[i]));
+ NineUnknown_Release(NineUnknown(This->buffers[i]));
ID3DPresent_DestroyD3DWindowBuffer(This->present, This->present_handles[i]);
if (This->present_buffers)
pipe_resource_reference(&(This->present_buffers[i]), NULL);
--
2.1.3
More information about the mesa-stable
mailing list