Let's say I have more physical devices supporting Vulkan (dedicated + integrated GPU, or 2 dedicated, or other possibilities). The user can choose the device to use in the options screen. I need to be able to persist his choice on disk.
What field can I use to uniquely identify a physical device across different executions?
vendorID
+deviceID
is not enough: I could have 2 identical GPUs connecteddeviceName
is not enough for the same reasondeviceLUID
is not guaranteed to be present, and may have the same problems asdeviceUUID
(below)deviceUUID
looks like the correct choice, but the spec says:While
VkPhysicalDeviceIDPropertiesKHR::deviceUUID
is specified to remain consistent across driver versions and system reboots, it is not intended to be usable as a serializable persistent identifier for a device. It may change when a device is physically added to, removed from, or moved to a different connector in a system while that system is powered down.
So... what should I use?