Vulkan_api.Devicetype t = {id : int;physical_device : Vulkan_types.vk_physical_device Ctypes.structure Ctypes.ptr;device : Vulkan_types.vk_device Ctypes.structure Ctypes.ptr;compute_queue : Vulkan_types.vk_queue Ctypes.structure Ctypes.ptr;queue_family : int;instance : Vulkan_types.vk_instance Ctypes.structure Ctypes.ptr;name : string;api_version : int * int * int;memory_properties : Vulkan_types.vk_physical_device_memory_properties
Ctypes.structure;command_pool : Vulkan_types.vk_command_pool;}val instance_ref :
Vulkan_types.vk_instance Ctypes.structure Ctypes.ptr option Stdlib.refval device_cache : (int, t) Stdlib.Hashtbl.tval get_total_device_memory :
Vulkan_types.vk_physical_device_memory_properties Ctypes.structure ->
int64Calculate total device memory from memory heaps
Sums all memory heaps that have VK_MEMORY_HEAP_DEVICE_LOCAL_BIT set. This gives us the actual GPU memory for discrete GPUs, or the largest device-accessible heap for integrated GPUs (which may be shared system RAM).
VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001 per Vulkan spec.
val get_or_create_instance :
unit ->
Vulkan_types.vk_instance Ctypes.structure Ctypes.ptrCreate Vulkan instance (shared among all devices)
val find_compute_queue_family :
Vulkan_types.vk_physical_device Ctypes.structure Ctypes_static.ptr ->
intFind compute queue family index
val get : int -> tval synchronize : t -> unitval destroy : t -> unit