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>
1. The iOS create_surface implementation needs to call out to the main
thread to create the window (UIKit requirement)
2. get_surface() can be called and will attempt to create the VkSurface
from an invalid view/layer.
Also pass the layer for MoltenVK so we don't get pesky 'UIView function
not called on main thread' warnings.