pub fn shared_device_index(
selector: Option<&str>,
) -> Result<usize, SharedVulkanError>Expand description
Where the device SharedVulkanContext::create opens is in the
loader’s physical-device order, for selector as ALPHA2_VULKAN_DEVICE
names it (None unset): the index FFmpeg takes for a Vulkan device of
its own (av_hwdevice_ctx_create’s device). A probe that opens its own
device passes this, so it opens the device an export renders, decodes, and
encodes on. FFmpeg reads a name that starts with a digit as an index,
so passing the variable on would pick another device, or none.
§Errors
Returns why no device is chosen: no Vulkan instance, or no adapter the shared device could open.