Merge vk-gl-cts/vulkan-cts-1.3.2 to vk-gl-cts/vulkan-cts-1.3.3
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / descriptor_indexing / vktDescriptorSetsIndexingTests.cpp
index 6eda5bb..640ad2b 100644 (file)
@@ -559,20 +559,23 @@ Move<VkDescriptorSetLayout>       CommonDescriptorInstance::createDescriptorSetLayout
 
        bool optional = (m_testParams.additionalDescriptorBinding != BINDING_Undefined) && (m_testParams.additionalDescriptorType != VK_DESCRIPTOR_TYPE_UNDEFINED);
 
+       const VkShaderStageFlags bindingStageFlags = (m_testParams.descriptorType == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT) ?
+                                                                                                       VkShaderStageFlags{VK_SHADER_STAGE_FRAGMENT_BIT} : m_testParams.stageFlags;
+
        const VkDescriptorSetLayoutBinding      bindings[] =
        {
                {
                        m_testParams.descriptorBinding,                         // binding
                        m_testParams.descriptorType,                            // descriptorType
                        descriptorCount,                                                        // descriptorCount
-                       m_testParams.stageFlags,                                        // stageFlags
+                       bindingStageFlags,                                                      // stageFlags
                        DE_NULL,                                                                        // pImmutableSamplers
                },
                {
                        m_testParams.additionalDescriptorBinding,       // binding
                        m_testParams.additionalDescriptorType,          // descriptorType
                        1,                                                                                      // descriptorCount
-                       m_testParams.stageFlags,                                        // stageFlags
+                       bindingStageFlags,                                                      // stageFlags
                        DE_NULL,                                                                        // pImmutableSamplers
                }
        };