You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This crashes the program with a 'vector subscript out of range' when there's only one device in the enumeration and it doesn't matchs the substring you've defined ("Intel").
Built with cmake + ninja in VS2022 on Windows 10v19044.2846, with an nVidia 1070 using driver version 528.33. Just selecting the first physical device using auto physicalDevice = physicalDevices[0] was a workaround for this system, which only enumerates a single physical device (the 1070).
The text was updated successfully, but these errors were encountered:
It seems to be an intended feature, if you want to just pick the first dedicated gpu with fallback, this is my favoured solution:
std::vector<vk::PhysicalDevice> physicalDevices = instance->enumeratePhysicalDevices();
physicalDevice = physicalDevices[0]; // Pick first devicefor (int i = 0; i < physicalDevices.size(); i++) {
if (physicalDevices[i].getProperties().deviceType == vk::PhysicalDeviceType::eDiscreteGpu) {
physicalDevice = physicalDevices[i]; // Only override if a discrete gpu is found
}
}
Was compiling a few vulkan tutorials I found on the web and came across yours. Line 73-76 in main.cpp:
This crashes the program with a 'vector subscript out of range' when there's only one device in the enumeration and it doesn't matchs the substring you've defined ("Intel").
Built with cmake + ninja in VS2022 on Windows 10v19044.2846, with an nVidia 1070 using driver version 528.33. Just selecting the first physical device using
auto physicalDevice = physicalDevices[0]
was a workaround for this system, which only enumerates a single physical device (the 1070).The text was updated successfully, but these errors were encountered: