Constructor
MaplibreNativeFfiVulkanDevicecreate
Declaration [src]
MaplibreNativeFfiVulkanDevice*
maplibre_native_ffi_vulkan_device_create (
MaplibreNativeFfiVulkanDeviceOptions* options,
GError** error
)
Description [src]
Creates a Vulkan instance, device, and graphics queue for render sessions.
Attach sessions with the context from
maplibre_native_ffi_vulkan_device_get_context(), in place of a device of
your own. Without device_uuid or device_luid, it prefers a discrete GPU.
The device enables the external memory and semaphore extensions that the GPU offers.
See mln_vulkan_device_create in the
C API reference.
It fails with these errors:
MAPLIBRE_NATIVE_FFI_ERROR_UNSUPPORTEDwhenmaplibre_native_ffi_supported_render_backend_mask()lacksMAPLIBRE_NATIVE_FFI_RENDER_BACKEND_FLAG_VULKAN, or whenpresentationis true and the Vulkan loader or the GPU can’t present.MAPLIBRE_NATIVE_FFI_ERROR_NOT_FOUNDwhen no GPU matchesdevice_uuidanddevice_luid.MAPLIBRE_NATIVE_FFI_ERROR_NATIVE_ERRORwhen there is no Vulkan loader, no GPU has a graphics queue, or Vulkan can’t create the instance or the device.
Parameters
options-
Type:
MaplibreNativeFfiVulkanDeviceOptionsThe value, or
NULL.The argument can be NULL.The data is owned by the caller of the function. error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the constructor if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: MaplibreNativeFfiVulkanDevice
The object.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |