Commit 8e5a138
committed
Vulkan: do not replace hardware GPU with software renderer
When no discrete GPU is present, SelectPhysicalDevice iterates all
physical devices and keeps overwriting SelectedPhysicalDevice without
breaking, because the break only fires for VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU.
On Linux with Mesa, a CPU-type software renderer (llvmpipe) is always
enumerated alongside the real hardware device. On a system with only an
integrated GPU the loop would iterate past the iGPU, land on llvmpipe as
the last entry, and silently return it as the selected device—making the
application run entirely on software rendering with no warning.
Fix this by skipping CPU-type devices when a hardware device has already
been selected. A CPU-type device is still accepted as a last resort when
no hardware GPU is found at all, so the fallback behavior is preserved.
Tested on an Intel Core Ultra 7 258V (Lunar Lake, Arc 130V/140V iGPU)
running Fedora 43 with Mesa 25.3.6.1 parent f1d42d5 commit 8e5a138
1 file changed
Lines changed: 7 additions & 0 deletions
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
717 | 717 | | |
718 | 718 | | |
719 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
720 | 727 | | |
721 | 728 | | |
722 | 729 | | |
| |||
0 commit comments