mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
vulkan/device_select: allow DRI_PRIME=vendor_id:device_id
To match the GL side. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17298>
This commit is contained in:
parent
a71b92fff8
commit
903e99150f
1 changed files with 10 additions and 4 deletions
|
|
@ -439,10 +439,16 @@ static uint32_t get_default_device(const struct instance_info *info,
|
|||
default_idx = device_select_find_explicit_default(pci_infos, physical_device_count, selection);
|
||||
|
||||
if (default_idx == -1 && dri_prime && !dri_prime_is_one) {
|
||||
if (!info->has_vulkan11 && !info->has_pci_bus)
|
||||
fprintf(stderr, "device-select: cannot correctly use DRI_PRIME tag\n");
|
||||
else
|
||||
default_idx = device_select_find_dri_prime_tag_default(pci_infos, physical_device_count, dri_prime);
|
||||
/* Try DRI_PRIME=vendor_id:device_id */
|
||||
default_idx = device_select_find_explicit_default(pci_infos, physical_device_count, dri_prime);
|
||||
|
||||
if (default_idx == -1) {
|
||||
/* Try DRI_PRIME=pci-xxxx_yy_zz_w */
|
||||
if (!info->has_vulkan11 && !info->has_pci_bus)
|
||||
fprintf(stderr, "device-select: cannot correctly use DRI_PRIME tag\n");
|
||||
else
|
||||
default_idx = device_select_find_dri_prime_tag_default(pci_infos, physical_device_count, dri_prime);
|
||||
}
|
||||
}
|
||||
if (default_idx == -1 && info->has_wayland)
|
||||
default_idx = device_select_find_wayland_pci_default(pci_infos, physical_device_count);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue