Fix FSR tests with imageless framebuffers
authorziga-lunarg <ziga@lunarg.com>
Tue, 27 Sep 2022 21:43:14 +0000 (23:43 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 29 Sep 2022 17:48:16 +0000 (17:48 +0000)
If framebuffer is created with imageless bit then pViewFormats must
include the format used in VkAttachmentDescription

This was fixed once already, but was undone with a bad merge

Components: Vulkan

VK-GL-CTS issue: 3943

Affected tests:
dEQP-VK.fragment_shading_rate.*.basic.*

Change-Id: I40cf4c47d397a10c690708fa06a932ff13cd2db2

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

index c501bc5..2146463 100644 (file)
@@ -1551,8 +1551,8 @@ tcu::TestStatus FSRTestInstance::iterate (void)
                                                m_data.framebufferDim.width,                                                            //  deUint32                    width;
                                                m_data.framebufferDim.height,                                                           //  deUint32                    height;
                                                m_data.numColorLayers,                                                                          //  deUint32                    layerCount;
-                                               0u,                                                                                                                     //  deUint32                    viewFormatCount;
-                                               DE_NULL                                                                                                         //  const VkFormat*             pViewFormats;
+                                               1u,                                                                                                                     //  deUint32                    viewFormatCount;
+                                               &cbFormat                                                                                                       //  const VkFormat*             pViewFormats;
                                        }
                                );
                                if (m_data.useAttachment())
@@ -1565,8 +1565,8 @@ tcu::TestStatus FSRTestInstance::iterate (void)
                                                srWidth,                                                                                                        //  deUint32                    width;
                                                srHeight,                                                                                                       //  deUint32                    height;
                                                numSRLayers,                                                                                            //  deUint32                    layerCount;
-                                               0u,                                                                                                                     //  deUint32                    viewFormatCount;
-                                               DE_NULL                                                                                                         //  const VkFormat*             pViewFormats;
+                                               1u,                                                                                                                     //  deUint32                    viewFormatCount;
+                                               &srFormat                                                                                                       //  const VkFormat*             pViewFormats;
                                        }
                                        );
 
@@ -1580,8 +1580,8 @@ tcu::TestStatus FSRTestInstance::iterate (void)
                                                m_data.framebufferDim.width,                                                            //  deUint32                    width;
                                                m_data.framebufferDim.height,                                                           //  deUint32                    height;
                                                m_data.numColorLayers,                                                                          //  deUint32                    layerCount;
-                                               0u,                                                                                                                     //  deUint32                    viewFormatCount;
-                                               DE_NULL                                                                                                         //  const VkFormat*             pViewFormats;
+                                               1u,                                                                                                                     //  deUint32                    viewFormatCount;
+                                               &dsFormat                                                                                                       //  const VkFormat*             pViewFormats;
                                        }
                                        );