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.RenderPass

The classic render-pass drawing path: a RenderPass over one or more colour attachments (and an optional depth attachment), framebuffers over the swapchain image views, and a vanilla pipeline that targets the render pass.

This is one of two self-contained alternatives — see Vulkan.Utils.DynamicRendering for the VK_KHR_dynamic_rendering path, which needs neither a render pass nor framebuffers. Pick one and import only it.

  • 1 type
  • 4 values

Render pass

2 declarations
valueallocateRenderPass
  1. :: MonadResource m
  2. => Device
  3. -> Vector (Format, ImageLayout)

    Colour attachments: (format, finalLayout).

  4. -> Maybe Format

    Optional depth attachment format.

  5. -> m (ReleaseKey, RenderPass)
#

A render pass with colors colour attachments (each (format, finalLayout)) and an optional depth attachment, all cleared on load and stored on completion, in a single graphics subpass. Attachment indices are the colours 0..N-1 then the depth attachment at N — the colour-then-depth order the framebuffer's attachments must follow. The external dependency synchronizes colour output and, when present, the depth fragment tests.

Pipeline

3 declarations
datadata PipelineConfig
#

Attachment + fixed-function knobs for a render-pass pipeline.

Construct with zero and override what differs, e.g. zero { RenderPass.colorFormats = [fmt], RenderPass.depthFormat = Just d }. The attachment shape — colorFormats count and whether depthFormat is present — MUST match the render pass; the formats themselves live in the render pass, so only the count and depth presence are read here.

Constructors

Instances1Zero
valueallocatePipelineFromShaders
  1. :: (MonadResource m, MonadUnliftIO m, MonadFail m, Specialization spec)
  2. => Device
  3. -> RenderPass
  4. -> PipelineConfig
  5. -> spec

    Specialization shared by every stage; () for none.

  6. -> [(ShaderStageFlagBits, ByteString)]
  7. -> m (ReleaseKey, Pipeline)
#

allocatePipeline from (stage, SPIR-V) pairs: compile each into a shader module, build the pipeline, then release the now-redundant module handles.

spec is one specialization shared by every stage (see Vulkan.Utils.Pipeline.Specialization); pass () for none.