mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
vulkan/device_select: Store Vulkan vendorID and deviceID as uint32_t
Vulkan uses 32-bit IDs, compared to PCI/USB 16-bit ones. Some driver vendorIDs do exceed 0xffff, including MESA (used by lavapipe). Without this, the value will be truncated, and device select layer will not match expected (or any) device. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3935 Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7977>
This commit is contained in:
parent
f4bbf29d76
commit
f93b7d14d6
1 changed files with 9 additions and 1 deletions
|
|
@ -24,10 +24,18 @@
|
|||
#define DEVICE_SELECT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "xf86drm.h"
|
||||
|
||||
/* We don't use `drmPciDeviceInfo` because it uses 16-bit ids,
|
||||
* instead of Vulkan's 32-bit ones. */
|
||||
struct device_info {
|
||||
uint32_t vendor_id;
|
||||
uint32_t device_id;
|
||||
};
|
||||
|
||||
struct device_pci_info {
|
||||
drmPciDeviceInfo dev_info;
|
||||
struct device_info dev_info;
|
||||
drmPciBusInfo bus_info;
|
||||
bool has_bus_info;
|
||||
bool cpu_device;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue