vulkan: provide a custom VK_DEFINE_NON_DISPATCHABLE_HANDLE
authorWim Taymans <wtaymans@redhat.com>
Wed, 31 Mar 2021 14:18:04 +0000 (16:18 +0200)
committerWim Taymans <wtaymans@redhat.com>
Tue, 6 Apr 2021 10:32:57 +0000 (12:32 +0200)
commitcefdd0d0f1d586506955aefa8808aa0fb6625d1d
tree30585f823370e0b4d9499a94a1c2659ffa8ec341
parent2ba5854c6bc76354ab2b764529dd5edcc18627b1
vulkan: provide a custom VK_DEFINE_NON_DISPATCHABLE_HANDLE

If the application did not define one yet, define our own
VK_DEFINE_NON_DISPATCHABLE_HANDLE that is independent of the
architecture.

Vulkan, by default, provides a define that depends on the architecture,
which causes the symbol type to be different. This causes an
architecture dependent .gir file, which then causes multilib
installation problems because the .gir files can't be shared.

Make it possible to override the format specifier and provide
a default one that is compatible with the default non dispatchable
handle.

Return VK_NULL_HANDLE from functions that return a non-dispatchable
handle.

Fixes #1566

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2130>
gst-libs/gst/vulkan/android/gstvkwindow_android.c
gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m
gst-libs/gst/vulkan/gstvkapi.h
gst-libs/gst/vulkan/gstvkhandle.h
gst-libs/gst/vulkan/ios/gstvkwindow_ios.m
gst-libs/gst/vulkan/wayland/gstvkwindow_wayland.c
gst-libs/gst/vulkan/win32/gstvkwindow_win32.c
gst-libs/gst/vulkan/xcb/gstvkwindow_xcb.c
sys/applemedia/videotexturecache-vulkan.mm