mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
[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:
parent
59e3c96976
commit
bd1a2aa5a1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user