Skip to content

Commit 461c0cc

Browse files
committed
GPU Vulkan Display: provide fallback in case no device-local host-visible memory is available
1 parent e4b81b8 commit 461c0cc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎GPU/GPUTracking/display/backend/GPUDisplayBackendVulkan.cxx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ static uint32_t findMemoryType(uint32_t typeFilter, vk::MemoryPropertyFlags prop
7979
return i;
8080
}
8181
}
82+
if ((properties & vk::MemoryPropertyFlagBits::eDeviceLocal) && (properties & vk::MemoryPropertyFlagBits::eHostVisible)) { // No host-visible device memory (e.g. no ReBAR), fall back to host memory
83+
return findMemoryType(typeFilter, properties & ~vk::MemoryPropertyFlags(vk::MemoryPropertyFlagBits::eDeviceLocal), physDev);
84+
}
8285

8386
throw std::runtime_error("failed to find suitable memory type!");
8487
}

0 commit comments

Comments
 (0)