mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[d3d11] Determine shared texture handle type through D3D11_RESOURCE_MISC_SHARED_NTHANDLE
This commit is contained in:
parent
8319793a98
commit
48557886de
@ -54,9 +54,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
imageInfo.shared = true;
|
imageInfo.shared = true;
|
||||||
imageInfo.sharing.mode = hSharedHandle == INVALID_HANDLE_VALUE ? DxvkSharedHandleMode::Export : DxvkSharedHandleMode::Import;
|
imageInfo.sharing.mode = hSharedHandle == INVALID_HANDLE_VALUE ? DxvkSharedHandleMode::Export : DxvkSharedHandleMode::Import;
|
||||||
imageInfo.sharing.type = (m_desc.MiscFlags & D3D11_RESOURCE_MISC_SHARED)
|
imageInfo.sharing.type = (m_desc.MiscFlags & D3D11_RESOURCE_MISC_SHARED_NTHANDLE)
|
||||||
? VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT
|
? VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT
|
||||||
: VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT;
|
: VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT;
|
||||||
imageInfo.sharing.handle = hSharedHandle;
|
imageInfo.sharing.handle = hSharedHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -696,10 +696,10 @@ namespace dxvk {
|
|||||||
void D3D11CommonTexture::ExportImageInfo() {
|
void D3D11CommonTexture::ExportImageInfo() {
|
||||||
HANDLE hSharedHandle;
|
HANDLE hSharedHandle;
|
||||||
|
|
||||||
if (m_desc.MiscFlags & D3D11_RESOURCE_MISC_SHARED)
|
if (m_desc.MiscFlags & D3D11_RESOURCE_MISC_SHARED_NTHANDLE)
|
||||||
hSharedHandle = openKmtHandle( m_image->sharedHandle() );
|
|
||||||
else
|
|
||||||
hSharedHandle = m_image->sharedHandle();
|
hSharedHandle = m_image->sharedHandle();
|
||||||
|
else
|
||||||
|
hSharedHandle = openKmtHandle( m_image->sharedHandle() );
|
||||||
|
|
||||||
DxvkSharedTextureMetadata metadata;
|
DxvkSharedTextureMetadata metadata;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user