Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- 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
Instances
type VkShaderModule = Ptr VkShaderModule_T Source #
VkShaderModule - Opaque handle to a shader module object
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
device
is the logical device that creates the shader module.
pCreateInfo
parameter is a pointer to an instance of theVkShaderModuleCreateInfo
structure.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pShaderModule
points to aVkShaderModule
handle 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)
device
must be a validVkDevice
handle
pCreateInfo
must be a valid pointer to a validVkShaderModuleCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pShaderModule
must be a valid pointer to aVkShaderModule
handle
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_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
device
is the logical device that destroys the shader module.
shaderModule
is the handle of the shader module to destroy.pAllocator
controls 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
VkAllocationCallbacks
were provided whenshaderModule
was created, a compatible set of callbacks must be provided here
- If no
VkAllocationCallbacks
were provided whenshaderModule
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle
- If
shaderModule
is notVK_NULL_HANDLE
,shaderModule
must be a validVkShaderModule
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
shaderModule
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
shaderModule
must be externally synchronized
See Also
data VkShaderModuleCreateInfo Source #
VkShaderModuleCreateInfo - Structure specifying parameters of a newly created shader module
Valid Usage
codeSize
must be greater than 0
- If
pCode
points to SPIR-V code,codeSize
must be a multiple of 4 pCode
must 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
pCode
points 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
pCode
points to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification pCode
must declare theShader
capability for SPIR-V codepCode
must not declare any capability that is not supported by the API, as described by the Capabilities section of the SPIR-V Environment appendix- If
pCode
declares any of the capabilities listed as optional in the SPIR-V Environment appendix, the corresponding feature(s) must be enabled.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
pNext
must beNULL
or a pointer to a valid instance ofVkShaderModuleValidationCacheCreateInfoEXT
flags
must be0
pCode
must be a valid pointer to an array of \(codeSize \over 4\)uint32_t
values
See Also
VkShaderModuleCreateFlags
,
VkStructureType
, vkCreateShaderModule
VkShaderModuleCreateInfo | |
|
Instances
Eq VkShaderModuleCreateInfo Source # | |
Show VkShaderModuleCreateInfo Source # | |
showsPrec :: Int -> VkShaderModuleCreateInfo -> ShowS # show :: VkShaderModuleCreateInfo -> String # showList :: [VkShaderModuleCreateInfo] -> ShowS # | |
Storable VkShaderModuleCreateInfo Source # | |
sizeOf :: VkShaderModuleCreateInfo -> Int # alignment :: VkShaderModuleCreateInfo -> Int # peekElemOff :: Ptr VkShaderModuleCreateInfo -> Int -> IO VkShaderModuleCreateInfo # pokeElemOff :: Ptr VkShaderModuleCreateInfo -> Int -> VkShaderModuleCreateInfo -> IO () # peekByteOff :: Ptr b -> Int -> IO VkShaderModuleCreateInfo # pokeByteOff :: Ptr b -> Int -> VkShaderModuleCreateInfo -> IO () # peek :: Ptr VkShaderModuleCreateInfo -> IO VkShaderModuleCreateInfo # poke :: Ptr VkShaderModuleCreateInfo -> VkShaderModuleCreateInfo -> IO () # |