vulkan/device-select: select correct default device for xcb apiVersion 1.0

In function fill_drm_device_info(), struct ext_pci_properties is filled only
if has_vulkan11 is true. But the data received from ext_pci_properties is used
without checking for has_vulkan11. Fixing this by setting
drm_device->has_bus_info also if has_vulkan11 is true.

This fix will help in case of nonidentical gpu being used and xcb_surface
extension enabled.

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12816>
This commit is contained in:
Yogesh Mohanmarimuthu 2021-09-12 16:30:43 +05:30 committed by Marge Bot
parent d993b59941
commit 5317874f91

View file

@ -260,7 +260,7 @@ static bool fill_drm_device_info(const struct instance_info *info,
drm_device->cpu_device = properties.properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU;
drm_device->dev_info.vendor_id = properties.properties.vendorID;
drm_device->dev_info.device_id = properties.properties.deviceID;
if (info->has_pci_bus) {
if (info->has_vulkan11 && info->has_pci_bus) {
drm_device->has_bus_info = true;
drm_device->bus_info.domain = ext_pci_properties.pciDomain;
drm_device->bus_info.bus = ext_pci_properties.pciBus;