# VkGraphicsPipelineShaderGroupsCreateInfoNV(3) Manual Page

## Name

VkGraphicsPipelineShaderGroupsCreateInfoNV - Structure specifying parameters of a newly created multi shader group pipeline

## C Specification

The `VkGraphicsPipelineShaderGroupsCreateInfoNV` structure is defined as:

    typedef struct VkGraphicsPipelineShaderGroupsCreateInfoNV {
        VkStructureType                             sType;
        const void*                                 pNext;
        uint32_t                                    groupCount;
        const VkGraphicsShaderGroupCreateInfoNV*    pGroups;
        uint32_t                                    pipelineCount;
        const VkPipeline*                           pPipelines;
    } VkGraphicsPipelineShaderGroupsCreateInfoNV;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to an extension-specific structure.

- `groupCount` is the number of elements in the `pGroups` array.

- `pGroups` is an array of VkGraphicsShaderGroupCreateInfoNV values specifying which state of the original `VkGraphicsPipelineCreateInfo` each shader group overrides.

- `pipelineCount` is the number of elements in the `pPipelines` array.

- `pPipelines` is an array of graphics `VkPipeline`, which are referenced within the created pipeline, including all their shader groups.

## Description

When referencing shader groups by index, groups defined in the referenced pipelines are treated as if they were defined as additional entries in `pGroups`. They are appended in the order they appear in the `pPipelines` array and in the `pGroups` array when those pipelines were defined.

The application must maintain the lifetime of all such referenced pipelines based on the pipelines that make use of them.

Valid Usage

- `groupCount` must be at least `1` and as maximum `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`maxGraphicsShaderGroupCount`.

- The sum of `groupCount` including those groups added from referenced `pPipelines` must also be as maximum `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`::`maxGraphicsShaderGroupCount`.

- The state of the first element of `pGroups` must match its equivalent within the parent’s `VkGraphicsPipelineCreateInfo`.

- Each element of `pGroups` must in combination with the rest of the pipeline state yield a valid state configuration

- All elements of `pGroups` must use the same shader stage combinations unless any mesh shader stage is used, then either combination of task and mesh or just mesh shader is valid.

- Mesh and regular primitive shading stages cannot be mixed across `pGroups`.

- Each element of the `pPipelines` member of `libraries` must have been created with identical state to the pipeline currently created except the state that can be overriden by `VkGraphicsShaderGroupCreateInfoNV`.

- The `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`→`deviceGeneratedCommands` feature must be enabled

Valid Usage (Implicit)

- `sType` must be `VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV`

- `pGroups` must be a valid pointer to an array of `groupCount` valid VkGraphicsShaderGroupCreateInfoNV structures

- If `pipelineCount` is not `0`, `pPipelines` must be a valid pointer to an array of `pipelineCount` valid VkPipeline handles

- `groupCount` must be greater than `0`

## See Also

VkGraphicsShaderGroupCreateInfoNV, VkPipeline, VkStructureType

## 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.

## Copyright

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