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

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulevulkan-utils-0.5.11.0Haskell2010

Vulkan.Utils.PipelineLayout

Assemble a pipeline's descriptor-set-layout bindings and push-constant ranges from the per-stage contributions of several shaders.

A binding (or push-constant range) declared by more than one stage must become a single entry whose stageFlags is the OR of the contributing stages — that is what a pipeline layout shared between, say, a vertex and a fragment shader needs. mergeDescriptorSetLayoutBindings and mergePushConstantRanges do that merge on plain Vulkan values, independent of where the per-stage bindings came from (hand written, or reflected — see vulkan-utils-spirv).

  • 1 type
  • 2 values

Merge the descriptor-set-layout bindings contributed by several stages for a single descriptor set. Bindings sharing a binding number are combined: their stageFlags are OR-ed and their descriptorCounts maxed. A descriptorType disagreement is a Left. The result is ascending by binding number.

Each input binding should carry the one stage that declares it (its stageFlags set to that stage); the merge turns the per-stage bindings into one multi-stage binding per binding number.

Two stages declared the same binding number with different descriptor types, which cannot be reconciled into one binding.

Constructors

Instances2Eq, Show