VKCREATECOMPUTEPIPEL(3)

NAME
vkCreateComputePipelines - Creates a new compute pipeline object.

C SPECIFICATION

To create compute pipelines, call:

    VkResult vkCreateComputePipelines(
        VkDevice                                    device,
        VkPipelineCache                             pipelineCache,
        uint32_t                                    createInfoCount,
        const VkComputePipelineCreateInfo*          pCreateInfos,
        const VkAllocationCallbacks*                pAllocator,
        VkPipeline*                                 pPipelines);

PARAMETERS

    • device is the logical device that creates the compute pipelines.

    • pipelineCache is either VK_NULL_HANDLE, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.

    • createInfoCount is the length of the pCreateInfos and pPipelines arrays.

    • pCreateInfos is an array of VkComputePipelineCreateInfo structures.

    • pAllocator controls host memory allocation as described in the Memory Allocation chapter.

    • pPipelines is a pointer to an array in which the resulting compute pipeline objects are returned.

        editing-note
        TODO (Jon) - Should we say something like “the i’th element of the pPipelines array is created based on the corresponding element of the pCreateInfos array”? Also for vkCreateGraphicsPipelines below.

DESCRIPTION

VALID USAGE

    • device must be a valid VkDevice handle

    • If pipelineCache is not VK_NULL_HANDLE, pipelineCache must be a valid VkPipelineCache handle

    • pCreateInfos must be a pointer to an array of createInfoCount valid VkComputePipelineCreateInfo structures

    • If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure

    • pPipelines must be a pointer to an array of createInfoCount VkPipeline handles

    • createInfoCount must be greater than 0

    • If pipelineCache is a valid handle, it must have been created, allocated or retrieved from device

    • Each of device and pipelineCache that are valid handles must have been created, allocated or retrieved from the same VkPhysicalDevice

    • If the flags member of any given 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

RETURN CODES

On success, this command returns

        • VK_SUCCESS

On failure, this command returns

        • VK_ERROR_OUT_OF_HOST_MEMORY

        • VK_ERROR_OUT_OF_DEVICE_MEMORY

SEE ALSO

VkAllocationCallbacks, VkComputePipelineCreateInfo, VkDevice, VkPipeline, VkPipelineCache

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkCreateComputePipelines

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly.

COPYRIGHT

Copyright (c) 2014-2016 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

AUTHOR

Khronos Group
    Author.