// Copyright 2019-2021 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

// Common Valid Usage
// common to VkRayTracingPipelineCreateInfo* structures
  * [[VUID-{refpage}-flags-03421]]
    If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT
    flag, and pname:basePipelineIndex is `-1`, pname:basePipelineHandle
    must: be a valid handle to a ray tracing sname:VkPipeline
  * [[VUID-{refpage}-flags-03422]]
    If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT
    flag, and pname:basePipelineHandle is dlink:VK_NULL_HANDLE,
    pname:basePipelineIndex must: be a valid index into the calling
    command's pname:pCreateInfos parameter
  * [[VUID-{refpage}-flags-03423]]
    If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT
    flag, and pname:basePipelineIndex is not `-1`, pname:basePipelineHandle
    must: be dlink:VK_NULL_HANDLE
  * [[VUID-{refpage}-flags-03424]]
    If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT
    flag, and pname:basePipelineHandle is not dlink:VK_NULL_HANDLE,
    pname:basePipelineIndex must: be `-1`
  * [[VUID-{refpage}-pStages-03426]]
    The shader code for the entry points identified by pname:pStages, and
    the rest of the state identified by this structure must: adhere to the
    pipeline linking rules described in the <<interfaces,Shader Interfaces>>
    chapter
  * [[VUID-{refpage}-layout-03427]]
    pname:layout must: be
    <<descriptorsets-pipelinelayout-consistency,consistent>> with all
    shaders specified in pname:pStages
  * [[VUID-{refpage}-layout-03428]]
    The number of resources in pname:layout accessible to each shader stage
    that is used by the pipeline must: be less than or equal to
    slink:VkPhysicalDeviceLimits::pname:maxPerStageResources
ifdef::VK_NV_device_generated_commands[]
  * [[VUID-{refpage}-flags-02904]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV
endif::VK_NV_device_generated_commands[]
ifdef::VK_EXT_pipeline_creation_cache_control[]
  * [[VUID-{refpage}-pipelineCreationCacheControl-02905]]
    If the <<features-pipelineCreationCacheControl,
    pname:pipelineCreationCacheControl>> feature is not enabled, pname:flags
    must: not include
    ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT or
    ename:VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT
endif::VK_EXT_pipeline_creation_cache_control[]
// Common Valid Usage
