Sarek_vulkan.Vulkan_api_streamStreams (specs/vulkan-async-launches.md).
A launch is appended to the stream's open command buffer and returns (Vulkan_api_batch.record_dispatch). The buffer is submitted, not waited for, when it holds batch_limit dispatches, when another stream of the device launches, and at any synchronisation point. The host blocks at synchronize, at Vulkan_api_device.drain_pending (host access to device memory, device wait, kernel eviction, device destroy) and when a command buffer is reused. A stream has two command buffers, so one can be recorded while the other runs.
All streams of a device submit to one queue, in launch order, because a launch first submits the open batches of the device's other streams; dispatches are ordered in memory by barriers (Vulkan_api_barrier).
module Device = Vulkan_api_devicetype t = Vulkan_api_slot.streamval device : t -> Sarek_vulkan.Vulkan_api_slot.Device.tval record_dispatch :
Vulkan_api_slot.stream ->
kernel:string ->
layout:Vulkan_types.vk_descriptor_set_layout ->
descriptors:int ->
record:
(Vulkan_types.vk_command_buffer Ctypes.structure Ctypes.ptr ->
Vulkan_types.vk_descriptor_set ->
unit) ->
unitval flush_device : Sarek_vulkan.Vulkan_api_batch.Device.t -> unitval synchronize : Vulkan_api_slot.stream -> unitval add_awaited :
Vulkan_api_slot.stream ->
Vulkan_api_slot.awaited_event ->
unitval pending_launches : Sarek_vulkan.Vulkan_api_batch.Device.t -> intval create : Sarek_vulkan.Vulkan_api_slot.Device.t -> Vulkan_api_slot.streamval forget_default : Vulkan_api_slot.stream -> unitval destroy : Vulkan_api_slot.stream -> unitNothing is unregistered if the wait for pending work raises: the stream stays reachable and intact.
val default : Device.t -> Vulkan_api_slot.stream