C Specification
To create one or more shader objects, call:
// Provided by VK_EXT_shader_object
VkResult vkCreateShadersEXT(
VkDevice device,
uint32_t createInfoCount,
const VkShaderCreateInfoEXT* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
VkShaderEXT* pShaders);
Parameters
-
deviceis the logical device that creates the shader objects. -
createInfoCountis the length of thepCreateInfosandpShadersarrays. -
pCreateInfosis a pointer to an array of VkShaderCreateInfoEXT structures. -
pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter. -
pShadersis a pointer to an array of VkShaderEXT handles in which the resulting shader objects are returned.
Description
When this function returns, whether or not it succeeds, it is guaranteed
that every element of pShaders will have been overwritten by either
VK_NULL_HANDLE or a valid VkShaderEXT handle.
This means that whenever shader creation fails, the application can
determine which shader the returned error pertains to by locating the first
VK_NULL_HANDLE element in pShaders.
It also means that an application can reliably clean up from a failed call
by iterating over the pShaders array and destroying every element that
is not VK_NULL_HANDLE.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.