Commit Graph

3 Commits

Author SHA1 Message Date
Witold Baryluk f93b7d14d6 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>
2020-12-08 16:19:25 +00:00
Dave Airlie afa1fba198 vulkan/device_select: don't pick a cpu driver as the default
This should stop apps using vallium by accident, when there
are better options.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6552>
2020-09-07 07:12:23 +00:00
Dave Airlie 9bc5b2d169 vulkan: add initial device selection layer. (v6.1)
This is code Bas has out of tree but I think mesa should be shipping it, and I've improved it.

Initially-written-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
v2: add infinite recursion fix (Bas)
v3: Fix wayland/xcb barrier, whitespace
v4: use a macro for getting apis, shorten some lines, use outarray
v5: rewrite in C, use hash_table/mutex.
v6: use once_init to init the mutex, fix freeing ht

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1766>
2020-04-27 19:57:49 +00:00