| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Utils.Shader
Synopsis
- shaderStage :: (MonadResource m, Specialization spec) => Device -> ShaderStageFlagBits -> spec -> ByteString -> m (ReleaseKey, SomeStruct PipelineShaderStageCreateInfo)
- shaderModuleStage :: MonadResource m => Device -> ShaderStageFlagBits -> Maybe SpecializationInfo -> ByteString -> m (ReleaseKey, SomeStruct PipelineShaderStageCreateInfo)
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.