simvx.graphics.gpu.sync

Fences, semaphores, and frames-in-flight synchronization.

Module Contents

Classes

FrameSync

Per-frame synchronization primitives.

Data

API

simvx.graphics.gpu.sync.__all__

[‘FrameSync’]

simvx.graphics.gpu.sync.log

‘getLogger(…)’

class simvx.graphics.gpu.sync.FrameSync(device: Any, image_count: int, frame_count: int = FRAMES_IN_FLIGHT)

Per-frame synchronization primitives.

Uses FRAMES_IN_FLIGHT fences and acquire semaphores, plus one render-finished semaphore per swapchain image to avoid the semaphore-reuse hazard described in the Vulkan swapchain guide.

Initialization

create() None
wait_and_reset() None
wait_for_image(image_index: int) None

Wait for any in-flight work using this swapchain image.

mark_image(image_index: int) None

Associate this swapchain image with the current frame’s fence.

advance() None
destroy() None