Sarek_vulkan.Vulkan_api_host_ffiVK_EXT_external_memory_host: structures and entry points for importing a range of host memory as device memory (specs/vulkan-async-api.md).
The extension's entry point is not exported by the loader, so it is resolved through vkGetDeviceProcAddr, the way Vulkan_bindings resolves the cooperative-matrix query.
val external_buffer_info : external_buffer_info Ctypes.structure Ctypes.typval ext_buf_sType :
(Unsigned.uint32, external_buffer_info Ctypes.structure) Ctypes.fieldval ext_buf_pNext :
(unit Ctypes_static.ptr, external_buffer_info Ctypes.structure) Ctypes.fieldval ext_buf_handleTypes :
(Unsigned.uint32, external_buffer_info Ctypes.structure) Ctypes.fieldval import_host_pointer_info :
import_host_pointer_info Ctypes.structure Ctypes.typval import_sType :
(Unsigned.uint32, import_host_pointer_info Ctypes.structure) Ctypes.fieldval import_pNext :
(unit Ctypes_static.ptr, import_host_pointer_info Ctypes.structure)
Ctypes.fieldval import_handleType :
(Unsigned.uint32, import_host_pointer_info Ctypes.structure) Ctypes.fieldval import_pHostPointer :
(unit Ctypes_static.ptr, import_host_pointer_info Ctypes.structure)
Ctypes.fieldval host_pointer_properties :
host_pointer_properties Ctypes.structure Ctypes.typval hp_sType :
(Unsigned.uint32, host_pointer_properties Ctypes.structure) Ctypes.fieldval hp_pNext :
(unit Ctypes_static.ptr, host_pointer_properties Ctypes.structure)
Ctypes.fieldval hp_memoryTypeBits :
(Unsigned.uint32, host_pointer_properties Ctypes.structure) Ctypes.fieldval external_memory_host_properties :
external_memory_host_properties Ctypes.structure Ctypes.typval emh_sType :
(Unsigned.uint32, external_memory_host_properties Ctypes.structure)
Ctypes.fieldval emh_pNext :
(unit Ctypes_static.ptr, external_memory_host_properties Ctypes.structure)
Ctypes.fieldval emh_minImportedHostPointerAlignment :
(Vulkan_types.vk_device_size,
external_memory_host_properties Ctypes.structure)
Ctypes.fieldval external_buffer_query : external_buffer_query Ctypes.structure Ctypes.typval query_sType :
(Unsigned.uint32, external_buffer_query Ctypes.structure) Ctypes.fieldval query_pNext :
(unit Ctypes_static.ptr, external_buffer_query Ctypes.structure) Ctypes.fieldval query_flags :
(Unsigned.uint32, external_buffer_query Ctypes.structure) Ctypes.fieldval query_usage :
(Unsigned.uint32, external_buffer_query Ctypes.structure) Ctypes.fieldval query_handleType :
(Unsigned.uint32, external_buffer_query Ctypes.structure) Ctypes.fieldVkExternalBufferProperties, with the leading field of its embedded VkExternalMemoryProperties flattened: only externalMemoryFeatures is read, and the two handle-type masks that follow it are padding here.
val external_buffer_result : external_buffer_result Ctypes.structure Ctypes.typval result_sType :
(Unsigned.uint32, external_buffer_result Ctypes.structure) Ctypes.fieldval result_pNext :
(unit Ctypes_static.ptr, external_buffer_result Ctypes.structure)
Ctypes.fieldval result_features :
(Unsigned.uint32, external_buffer_result Ctypes.structure) Ctypes.fieldval result_exportFrom :
(Unsigned.uint32, external_buffer_result Ctypes.structure) Ctypes.fieldval result_compatible :
(Unsigned.uint32, external_buffer_result Ctypes.structure) Ctypes.fieldval vkGetPhysicalDeviceExternalBufferProperties_lazy :
(Vulkan_types.vk_physical_device Ctypes.structure Ctypes_static.ptr ->
external_buffer_query Ctypes.structure Ctypes_static.ptr ->
external_buffer_result Ctypes.structure Ctypes_static.ptr ->
unit)
lazy_tval buffer_import_supported :
Vulkan_types.vk_physical_device Ctypes.structure Ctypes_static.ptr ->
usage:int ->
boolWhether phys_dev can import a host allocation as a transfer buffer (vkGetPhysicalDeviceExternalBufferProperties, core in Vulkan 1.1).
val query_import_alignment :
Vulkan_types.vk_physical_device Ctypes.structure Ctypes_static.ptr ->
intminImportedHostPointerAlignment of phys_dev: the alignment required of both the address and the size of an imported range. Only meaningful when the device advertises extension_name.
val vkGetDeviceProcAddr_lazy :
(Vulkan_types.vk_device Ctypes.structure Ctypes_static.ptr ->
string ->
unit Ctypes_static.ptr)
lazy_ttype properties_fn =
Vulkan_types.vk_device Ctypes.structure Ctypes.ptr ->
Unsigned.uint32 ->
unit Ctypes.ptr ->
host_pointer_properties Ctypes.structure Ctypes.ptr ->
Vulkan_types.vk_resultval resolve_properties_fn :
Vulkan_types.vk_device Ctypes.structure Ctypes_static.ptr ->
properties_fn optionResolve vkGetMemoryHostPointerPropertiesEXT for device. vkGetDeviceProcAddr returns the entry point of the driver that owns the device (an address inside that driver's library), so the result belongs to this device only: it is kept in the device record and never shared, because a second device may come from another driver. None when the driver does not know the function.
val get_memory_host_pointer_properties :
properties_fn ->
Vulkan_types.vk_device Ctypes.structure Ctypes.ptr ->
unit Ctypes.ptr ->
host_pointer_properties Ctypes.structure Ctypes.ptr ->
Vulkan_types.vk_resultvkGetMemoryHostPointerPropertiesEXT through fn, the function resolved for device: the memory types host_ptr can be imported as. The device must have been created with extension_name enabled.