vulkan: add initial device selection layer. (v6.1)
authorDave Airlie <airlied@redhat.com>
Sun, 29 Mar 2020 23:38:38 +0000 (09:38 +1000)
committerMarge Bot <eric+marge@anholt.net>
Mon, 27 Apr 2020 19:57:49 +0000 (19:57 +0000)
commit9bc5b2d169d3a3c9d52fc30987eaba52e3b7dc00
treef96d1c2e44412a689e8f4aeb182cec87cd49db8a
parent4a42a5058564a1d862e29eee80925ecd8b0ed1a2
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>
meson_options.txt
src/vulkan/device-select-layer/VkLayer_MESA_device_select.json [new file with mode: 0644]
src/vulkan/device-select-layer/device_select.h [new file with mode: 0644]
src/vulkan/device-select-layer/device_select_layer.c [new file with mode: 0644]
src/vulkan/device-select-layer/device_select_wayland.c [new file with mode: 0644]
src/vulkan/device-select-layer/device_select_x11.c [new file with mode: 0644]
src/vulkan/device-select-layer/meson.build [new file with mode: 0644]
src/vulkan/meson.build