Function SDL_AddVulkanRenderSemaphores
pub unsafe extern "C" fn SDL_AddVulkanRenderSemaphores(
renderer: *mut SDL_Renderer,
wait_stage_mask: u32,
wait_semaphore: i64,
signal_semaphore: i64,
) -> bool
dep_sdl3
only.Expand description
Add a set of synchronization semaphores for the current frame.
The Vulkan renderer will wait for wait_semaphore
before submitting
rendering commands and signal signal_semaphore
after rendering commands
are complete for this frame.
This should be called each frame that you want semaphore synchronization.
The Vulkan renderer may have multiple frames in flight on the GPU, so you
should have multiple semaphores that are used for synchronization. Querying
SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER
will give you the
maximum number of semaphores you’ll need.
§Parameters
renderer
: the rendering context.wait_stage_mask
: the VkPipelineStageFlags for the wait.wait_semaphore
: a VkSempahore to wait on before rendering the current frame, or 0 if not needed.signal_semaphore
: a VkSempahore that SDL will signal when rendering for the current frame is complete, or 0 if not needed.
§Return value
Returns true on success or false on failure; call SDL_GetError()
for more
information.
§Thread safety
It is NOT safe to call this function from two threads at once.
§Availability
This function is available since SDL 3.2.0.