vkDestroyShaderEXT
To destroy a shader object, call:
void vkDestroyShaderEXT(
VkDevice device,
VkShaderEXT shader,
const VkAllocationCallbacks* pAllocator);
deviceis the logical device that destroys the shader object.shaderis the handle of the shader object to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Destroying a shader object used by one or more command buffers in the recording or executable state causes those command buffers to move into the invalid state.
Valid Usage
VUID-vkDestroyShaderEXT-None-08481
The shaderObject feature must be
enabled
VUID-vkDestroyShaderEXT-shader-08482
All submitted commands that refer to shader must have completed
execution
VUID-vkDestroyShaderEXT-pAllocator-08483
If VkAllocationCallbacks were provided when shader was
created, a compatible set of callbacks must be provided here
VUID-vkDestroyShaderEXT-pAllocator-08484
If no VkAllocationCallbacks were provided when shader was
created, pAllocator must be NULL
Valid Usage (Implicit)
VUID-vkDestroyShaderEXT-device-parameter
device must be a valid VkDevice handle
VUID-vkDestroyShaderEXT-shader-parameter
If shader is not VK_NULL_HANDLE, shader must be a valid VkShaderEXT handle
VUID-vkDestroyShaderEXT-pAllocator-parameter
If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
VUID-vkDestroyShaderEXT-shader-parent
If shader is a valid handle, it must have been created, allocated, or retrieved from device
Host Synchronization
- Host access to
shadermust be externally synchronized ::