Files
Matt Borgerson 4bdad19910 nv2a/vk: Select physical device that GL context was created with
The Vulkan renderer shares its display image with the GL contexts through
external memory, which only works when the Vulkan device is the GPU those
contexts run on. Until now the renderer selected its device by the saved
display.vulkan.preferred_physical_device name, or else the first compatible
device, and wrote the result back to the config. On multi-GPU systems this
could pick a device other than the one driving the display and crash on
import, and the saved name could be wrong on a later boot.

Read GL_DEVICE_UUID_EXT from the renderer's GL context and require the
Vulkan device with the matching UUID. The UUID is read before the Vulkan
instance is created, as loading Vulkan drivers can unbind the current GL
context. If no supported device matches, initialization fails with a clear
message and pgraph falls back to the default renderer instead of degrading.

As a last resort, display.vulkan.force_physical_device names a device to
use regardless of detection. It is never written by xemu, and it uses a
new key so stale preferred_physical_device entries saved by older builds
are ignored rather than forcing a device.

Bug reports now always include the GL strings, which describe the same GPU
as the Vulkan device, in place of the saved device name.
2026-11-13 12:04:50 -07:00
..
…
…
2026-01-21 18:40:07 -07:00
…
…
2026-01-21 18:40:07 -07:00