HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulevulkan-utils-0.5.11.0Haskell2010

Vulkan.Utils.VulkanContext

Application-static Vulkan handles plus the recycle channel ends used by the recycling Frame machinery.

Constructed once at boot, never modified. Sub-systems (swapchain, frame loop, window loop) accept a VulkanContext so they don't need their own copies of device/queues plumbing.

  • 2 types
  • 1 value
datadata VulkanContext rr
#

A bunch of long-lived handles that the application carries around. The recycle channel ends carry per-frame RecycledResources between the frame loop and the wait-and-recycle thread.

Constructors

datadata RecycledResources a
#

The bits of state recycled between frames: a binary image-available semaphore (signalled by image acquisition, waited on by the frame's submit) and the command pool the frame's commands are recorded into.

The render-finished present-wait semaphore is not/ here — it is per swapchain image (see sRenderFinished), because a present-wait semaphore is only safe to reuse once its image is re-acquired, not when the frame's render completes.

Constructors

  • RecycledResources
    • rrImageAvailable :: Semaphore
    • rrCommandPools :: Queues CommandPool

      One command pool per queue role, reset when the frame retires. Roles sharing a queue family share the pool handle, so a frame holds one pool per distinct family — pools are expensive to create and cheap to reset, which is the whole point of recycling them.

    • rrData :: a

      Double-buffered data of the application to ping-pong around updating and rendering.