From 8319793a985445d9b2fa4b585188fd2ccc9a14f2 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Wed, 5 Jul 2023 18:10:08 -0600 Subject: [PATCH] [d3d11] Always close handle in D3D11CommonTexture::ExportImageInfo() For KMT handle openKmtHandle() creates new handle, for NT handle m_image->sharedHandle() gets duplicated handle from vkGetMemoryWin32HandleKHR(). --- src/d3d11/d3d11_texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index b6f7d92a9..875b6165e 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -719,7 +719,7 @@ namespace dxvk { Logger::warn("D3D11: Failed to write shared resource info for a texture"); } - if ((m_desc.MiscFlags & D3D11_RESOURCE_MISC_SHARED) && hSharedHandle != INVALID_HANDLE_VALUE) + if (hSharedHandle != INVALID_HANDLE_VALUE) CloseHandle(hSharedHandle); }