vkCreateComputePipelines
To create compute pipelines, call:
VkResult vkCreateComputePipelines(
VkDevice device,
VkPipelineCache pipelineCache,
uint32_t createInfoCount,
const VkComputePipelineCreateInfo* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
VkPipeline* pPipelines);
pub fn create_compute_pipelines(
device: vk::Device,
pipeline_cache: vk::PipelineCache,
create_info_count: u32,
p_create_infos: *const vk::ComputePipelineCreateInfo,
p_allocator: *const vk::AllocationCallbacks,
p_pipelines: *mut vk::Pipeline,
) -> vk::Result;
deviceis the logical device that creates the compute pipelines.pipelineCacheis either VK_NULL_HANDLE, indicating that pipeline caching is disabled, or to enable caching, the handle of a valid VkPipelineCache object. The implementation must not access this object outside of the duration of this command.createInfoCountis the length of thepCreateInfosandpPipelinesarrays.pCreateInfosis a pointer to an array of VkComputePipelineCreateInfo structures.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pPipelinesis a pointer to an array of VkPipeline handles in which the resulting compute pipeline objects are returned.
Pipelines are created and returned as described for Multiple Pipeline Creation.
Valid Usage
VUID-vkCreateComputePipelines-device-09661
device must support at least one queue family with the
VK_QUEUE_COMPUTE_BIT capability
VUID-vkCreateComputePipelines-flags-00695
If the flags member of any element of pCreateInfos contains
the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the
basePipelineIndex member of that same element is not -1,
basePipelineIndex must be less than the index into
pCreateInfos that corresponds to that element
VUID-vkCreateComputePipelines-flags-00696
If the flags member of any element of pCreateInfos contains
the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline
must have been created with the
VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set
VUID-vkCreateComputePipelines-pipelineCache-02873
If pipelineCache was created with
VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access
to pipelineCache must be
externally synchronized
VUID-vkCreateComputePipelines-pNext-09616
If VkPipelineBinaryInfoKHR::binaryCount is not 0 for any
element of pCreateInfos, pipelineCache must be
VK_NULL_HANDLE
VUID-vkCreateComputePipelines-pNext-09617
If a VkPipelineCreateFlags2CreateInfoKHR structure with the
VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR flag set is included in
the pNext chain of any element of pCreateInfos,
pipelineCache must be VK_NULL_HANDLE
VUID-vkCreateComputePipelines-binaryCount-09620
If VkPipelineBinaryInfoKHR::binaryCount is not 0 for any
element of pCreateInfos,
VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BITmust not be set in the flags of that element
VUID-vkCreateComputePipelines-binaryCount-09621
If VkPipelineBinaryInfoKHR::binaryCount is not 0 for any
element of pCreateInfos,
VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT must
not be set in the flags of that element
VUID-vkCreateComputePipelines-binaryCount-09622
If VkPipelineBinaryInfoKHR::binaryCount is not 0 for any
element of pCreateInfos,
VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT must
not be set in the flags of that element
VUID-vkCreateComputePipelines-pCreateInfos-11414
If any element of pCreateInfos sets
VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded
sampler mappings, there must be less than
(maxSamplerAllocationCount
- (minSamplerHeapReservedRangeWithEmbedded /
samplerDescriptorSize))
VkSampler objects currently created on the device
VUID-vkCreateComputePipelines-pCreateInfos-11429
If any element of pCreateInfos sets VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT and includes embedded sampler mappings, this command must not cause the total number of unique embedded samplers in pipelines
and shaders on this device to exceed maxDescriptorHeapEmbeddedSamplers
Valid Usage (Implicit)
VUID-vkCreateComputePipelines-device-parameter
device must be a valid VkDevice handle
VUID-vkCreateComputePipelines-pipelineCache-parameter
If pipelineCache is not VK_NULL_HANDLE, pipelineCache must be a valid VkPipelineCache handle
VUID-vkCreateComputePipelines-pCreateInfos-parameter
pCreateInfos must be a valid pointer to an array of createInfoCount valid VkComputePipelineCreateInfo structures
VUID-vkCreateComputePipelines-pAllocator-parameter
If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
VUID-vkCreateComputePipelines-pPipelines-parameter
pPipelines must be a valid pointer to an array of createInfoCount VkPipeline handles
VUID-vkCreateComputePipelines-createInfoCount-arraylength
createInfoCount must be greater than 0
VUID-vkCreateComputePipelines-pipelineCache-parent
If pipelineCache is a valid handle, it must have been created, allocated, or retrieved from device