Fix vktFragmentShadingRateBasic tests
authorMohankumar Nekkarakalaya <mnekkara@qti.qualcomm.com>
Tue, 11 Jan 2022 00:27:09 +0000 (16:27 -0800)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Sat, 15 Jan 2022 01:32:50 +0000 (01:32 +0000)
Many graphics pipelines are used in dynamic render pass which uses
fragment shading attachment, but these pipelines don't have
VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
flags when they are created. Adding those flags.

Affects: dEQP-VK.fragment_shading_rate.dynamic_rendering.*

Components: Vulkan

VK-GL-CTS issue: 3440

Change-Id: I3dd0aae9d6e9f2fc0bb5266f4f4ba442ebc0317b

external/vulkancts/modules/vulkan/fragment_shading_rate/vktFragmentShadingRateBasic.cpp

index fb01a4f..93d42d6 100644 (file)
@@ -1865,7 +1865,7 @@ tcu::TestStatus FSRTestInstance::iterate (void)
                                0.0f,                                           // float                        maxDepthBounds;
                        };
 
-                       const VkGraphicsPipelineCreateInfo                              graphicsPipelineCreateInfo              =
+                       VkGraphicsPipelineCreateInfo graphicsPipelineCreateInfo =
                        {
                                VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,        // VkStructureType                                                                      sType;
                                &shadingRateStateCreateInfo,                                            // const void*                                                                          pNext;
@@ -1888,6 +1888,9 @@ tcu::TestStatus FSRTestInstance::iterate (void)
                                0                                                                                                       // int                                                                                          basePipelineIndex;
                        };
 
+                       if (m_data.useDynamicRendering)
+                               graphicsPipelineCreateInfo.flags |= VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR;
+
                        VkImageMemoryBarrier imageBarrier =
                        {
                                VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,                         // VkStructureType              sType