Modulevulkan-utils-0.5.11.0Haskell2010
Vulkan.Utils.Pipeline
A pipeline bundled with everything needed to drive it.
Layout keeps, next to the created handles, the inputs they were created from:
the per-set DescriptorSetLayoutCreateInfos and the push-constant ranges.
Descriptor-set allocation and push recording need exactly those — allocateSet
sizes its pool from the kept set info and push takes its stage flags and byte
count from the kept range — so neither is hand-counted at call sites, where it
drifts from the shaders. The infos can be hand written or reflected from SPIR-V
(Vulkan.Utils.SpirV.Pipeline in vulkan-utils-spirv produces these types).
Designed for qualified import:
import Vulkan.Utils.Pipeline (Pipeline)
import qualified Vulkan.Utils.Pipeline as Pipeline
Pipeline.bind cb pl
Pipeline.push cb pl params
set <- Pipeline.allocateSet dev pl 0
Pipeline.bindSet cb pl 0 set
- 3 types
- 9 values
- Packagevulkan-utils-0.5.11.0
- Exports12
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourcePipeline.hs
allocateDescriptorSet for the pipeline's set setNo.
Bind one descriptor set at setNo, via the pipeline's bind point and layout.
Push a as the layout's single push-constant range: its stage flags, its size.
The range's size is what the layout accepts — often less than a's sizeOf
(std430 blocks trailing-pad) — so exactly that many of a's leading bytes are
pushed; a value too small to cover the range is an error, not an out-of-bounds
read. Layouts with several ranges (or a range off 0) need cmdPushConstants
directly.
A pipeline layout, kept with its sets (by set number) and push-constant ranges.
Constructors
LayoutpipelineLayout :: PipelineLayoutsets :: [(Word32, Set)]pushRanges :: [PushConstantRange]
Create the pipeline layout over the sets' layouts and the ranges.
Sharing a Set between layouts keeps them set-compatible on that number. Set numbers must be contiguous from 0 (pad gaps with empty sets) — bindSet addresses sets by number, which has to agree with the layout's slot order — and anything else fails here rather than misbinding at record time.
The layout's set at setNo; fails if there is none.
A descriptor set layout, kept with the info it was created from.
Constructors
Create the set layout, keeping its info for allocateDescriptorSet pool sizing.
One descriptor set of the layout, from its own throwaway pool.
The pool is provisioned from the kept info's bindings, so it tracks whatever the
layout holds. It owns just this set and is released with m's
ResourceT.
count descriptor sets of the layout, from one throwaway pool.
The key releases the pool and with it every set — for sets bound to recreated resources (a swapchain's image views).