mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
[d3d9] Fix shared handle check for exporting images
Co-authored-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
parent
c87660480d
commit
1d1d8adee6
@ -241,13 +241,14 @@ namespace dxvk {
|
|||||||
imageInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
|
imageInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
|
||||||
imageInfo.layout = VK_IMAGE_LAYOUT_GENERAL;
|
imageInfo.layout = VK_IMAGE_LAYOUT_GENERAL;
|
||||||
imageInfo.shared = m_desc.IsBackBuffer;
|
imageInfo.shared = m_desc.IsBackBuffer;
|
||||||
|
|
||||||
if (pSharedHandle) {
|
if (pSharedHandle) {
|
||||||
imageInfo.sharing.type = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT;
|
imageInfo.sharing.type = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT;
|
||||||
if (*pSharedHandle) {
|
imageInfo.sharing.mode = (*pSharedHandle == INVALID_HANDLE_VALUE || *pSharedHandle == nullptr)
|
||||||
imageInfo.shared = true;
|
? DxvkSharedHandleMode::Export
|
||||||
imageInfo.sharing.mode = *pSharedHandle == INVALID_HANDLE_VALUE ? DxvkSharedHandleMode::Export : DxvkSharedHandleMode::Import;
|
: DxvkSharedHandleMode::Import;
|
||||||
imageInfo.sharing.handle = *pSharedHandle;
|
imageInfo.sharing.type = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT;
|
||||||
}
|
imageInfo.sharing.handle = *pSharedHandle;
|
||||||
// TODO: validate metadata?
|
// TODO: validate metadata?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user