mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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)
|
if (isGpuWritable)
|
||||||
hints.set(DxvkMemoryFlag::GpuWritable);
|
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
|
// Ask driver whether we should be using a dedicated allocation
|
||||||
m_image.memory = memAlloc.alloc(&memReq.memoryRequirements,
|
m_image.memory = memAlloc.alloc(&memReq.memoryRequirements,
|
||||||
dedicatedRequirements, dedMemoryAllocInfo, memFlags, hints);
|
dedicatedRequirements, dedMemoryAllocInfo, memFlags, hints);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user