| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core10.Shader
- newtype VkShaderModuleCreateFlags = VkShaderModuleCreateFlags VkFlags
- type VkShaderModule = Ptr VkShaderModule_T
- vkCreateShaderModule :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkShaderModuleCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pShaderModule" ::: Ptr VkShaderModule) -> IO VkResult
- vkDestroyShaderModule :: ("device" ::: VkDevice) -> ("shaderModule" ::: VkShaderModule) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- data VkShaderModuleCreateInfo = VkShaderModuleCreateInfo {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkFlags :: VkShaderModuleCreateFlags
- vkCodeSize :: CSize
- vkPCode :: Ptr Word32
Documentation
newtype VkShaderModuleCreateFlags Source #
VkShaderModuleCreateFlags - Reserved for future use
Description
VkShaderModuleCreateFlags is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Constructors
| VkShaderModuleCreateFlags VkFlags |
type VkShaderModule = Ptr VkShaderModule_T Source #
VkShaderModule - Opaque handle to a shader module object
Description
See Also
VkPipelineShaderStageCreateInfo,
vkCreateShaderModule, vkDestroyShaderModule
vkCreateShaderModule :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkShaderModuleCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pShaderModule" ::: Ptr VkShaderModule) -> IO VkResult Source #
vkCreateShaderModule - Creates a new shader module object
Parameters
deviceis the logical device that creates the shader module.
pCreateInfoparameter is a pointer to an instance of theVkShaderModuleCreateInfostructure.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pShaderModulepoints to aVkShaderModulehandle in which the resulting shader module object is returned.
Description
Once a shader module has been created, any entry points it contains can be used in pipeline shader stages as described in Compute Pipelines and Graphics Pipelines.
If the shader stage fails to compile VK_ERROR_INVALID_SHADER_NV will
be generated and the compile log will be reported back to the
application by {html_spec_relative}#VK_EXT_debug_report if enabled.
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pCreateInfomust be a valid pointer to a validVkShaderModuleCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pShaderModulemust be a valid pointer to aVkShaderModulehandle
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_INVALID_SHADER_NV
See Also
VkAllocationCallbacks,
VkDevice,
VkShaderModule, VkShaderModuleCreateInfo
vkDestroyShaderModule :: ("device" ::: VkDevice) -> ("shaderModule" ::: VkShaderModule) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroyShaderModule - Destroy a shader module module
Parameters
deviceis the logical device that destroys the shader module.
shaderModuleis the handle of the shader module to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Description
A shader module can be destroyed while pipelines created using its shaders are still in use.
Valid Usage
- If
VkAllocationCallbackswere provided whenshaderModulewas created, a compatible set of callbacks must be provided here
- If no
VkAllocationCallbackswere provided whenshaderModulewas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
- If
shaderModuleis notVK_NULL_HANDLE,shaderModulemust be a validVkShaderModulehandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure - If
shaderModuleis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
shaderModulemust be externally synchronized
See Also
data VkShaderModuleCreateInfo Source #
VkShaderModuleCreateInfo - Structure specifying parameters of a newly created shader module
Description
Valid Usage
codeSizemust be greater than 0
- If
pCodepoints to SPIR-V code,codeSizemust be a multiple of 4 pCodemust point to either valid SPIR-V code, formatted and packed as described by the Khronos SPIR-V Specification or valid GLSL code which must be written to the GL_KHR_vulkan_glsl extension specification- If
pCodepoints to SPIR-V code, that code must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix - If
pCodepoints to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification pCodemust declare theShadercapability for SPIR-V codepCodemust not declare any capability that is not supported by the API, as described by the Capabilities section of the SPIR-V Environment appendix- If
pCodedeclares any of the capabilities listed as optional in the SPIR-V Environment appendix, the corresponding feature(s) must be enabled.
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
pNextmust beNULLor a pointer to a valid instance ofVkShaderModuleValidationCacheCreateInfoEXTflagsmust be0pCodemust be a valid pointer to an array of \(codeSize \\over 4\)uint32_tvalues
See Also
VkShaderModuleCreateFlags,
VkStructureType, vkCreateShaderModule
Constructors
| VkShaderModuleCreateInfo | |
Fields
| |