Skip to content

Commit

Permalink
Fix: On Linux this was returning VK_INCOMPLETE because it had 2 GPUs …
Browse files Browse the repository at this point in the history
…so the assert failed
  • Loading branch information
henriqueaklein committed Aug 3, 2024
1 parent a3ed479 commit 5ec87b6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/backend/vulkan/component/VulkanDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ VulkanDevice::VulkanDevice(std::shared_ptr<VulkanInstance> instance, const std::
uint32_t gpuCount = 0;
CALL_VK(mInstance->enumeratePhysicalDevices(gpuCount, nullptr));
MNN_ASSERT(0 != gpuCount);
VkPhysicalDevice tmpGpus[1] = {nullptr};
gpuCount = 1;
CALL_VK(mInstance->enumeratePhysicalDevices(gpuCount, tmpGpus));
std::vector<VkPhysicalDevice> tmpGpus(gpuCount);
CALL_VK(mInstance->enumeratePhysicalDevices(gpuCount, tmpGpus.data()));
MNN_ASSERT(nullptr != tmpGpus[0]);
mPhysicalDevice = tmpGpus[0];

Expand Down

0 comments on commit 5ec87b6

Please sign in to comment.