vulkan-utils-0.5.11.0: Utils for the vulkan package
Safe HaskellNone
LanguageHaskell2010

Vulkan.Utils.Shader

Synopsis

Documentation

shaderStage :: (MonadResource m, Specialization spec) => Device -> ShaderStageFlagBits -> spec -> ByteString -> m (ReleaseKey, SomeStruct PipelineShaderStageCreateInfo) Source #

Build a PipelineShaderStageCreateInfo for a single SPIR-V module with entry point main. The returned ReleaseKey frees the module — release it once the pipeline is built.

The spec argument supplies specialization constants (see Specialization); pass () for none.

shaderModuleStage :: MonadResource m => Device -> ShaderStageFlagBits -> Maybe SpecializationInfo -> ByteString -> m (ReleaseKey, SomeStruct PipelineShaderStageCreateInfo) Source #

Lower-level companion to shaderStage taking an already-built SpecializationInfo (or Nothing). Useful when one specialization is shared across several stages — build it once with withSpecialization and pass it to each stage rather than re-packing per stage.