[dxvk] Force dedicated allocation for exportable images

The Nvidia driver does not set prefers-/requiresDedicatedAllocation
for exportable images on its own.

This makes DXVK ignore the dedicated allocation struct ptr
which also contains VkExportMemoryAllocateInfo or
VkImportMemoryWin32HandleInfoKHR.
This commit is contained in:
Robin Kertels 2022-03-12 23:38:22 +01:00 committed by Philip Rebohle
parent 59e3c96976
commit bd1a2aa5a1
1 changed files with 5 additions and 0 deletions

View File

@ -140,6 +140,11 @@ namespace dxvk {
if (isGpuWritable)
hints.set(DxvkMemoryFlag::GpuWritable);
if (m_shared) {
dedicatedRequirements.prefersDedicatedAllocation = VK_TRUE;
dedicatedRequirements.requiresDedicatedAllocation = VK_TRUE;
}
// Ask driver whether we should be using a dedicated allocation
m_image.memory = memAlloc.alloc(&memReq.memoryRequirements,
dedicatedRequirements, dedMemoryAllocInfo, memFlags, hints);