From 814a24ca6a811d744d9ae10f8d6e8f8ad7439250 Mon Sep 17 00:00:00 2001 From: ziga-lunarg Date: Sun, 5 Mar 2023 16:36:06 +0100 Subject: [PATCH] Fix errors in attachment feedback loop layout tests Attachments are not in expected layouts, pipeline color blend attachments count doesn't match that of the associated render pass and some of the required pipeline layouts are NULL Components: Vulkan VK-GL-CTS issue: 4318 Affected tests: dEQP-VK.pipeline.*.attachment_feedback_loop_layout.* Change-Id: I5d44474f2617c73bb1f153e43638a35ea980f42b --- ...ktPipelineAttachmentFeedbackLoopLayoutTests.cpp | 37 +++++++++++++++++++--- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineAttachmentFeedbackLoopLayoutTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineAttachmentFeedbackLoopLayoutTests.cpp index 7d10019..5b5f252 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineAttachmentFeedbackLoopLayoutTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineAttachmentFeedbackLoopLayoutTests.cpp @@ -655,7 +655,21 @@ void AttachmentFeedbackLoopLayoutImageSamplingInstance::setup (void) m_framebuffer = createFramebuffer(vk, vkDevice, &framebufferParams); } - // Create pipeline layout + // Create pipeline layouts + { + const VkPipelineLayoutCreateInfo pipelineLayoutParams = + { + VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, // VkStructureType sType; + DE_NULL, // const void* pNext; + 0u, // VkPipelineLayoutCreateFlags flags; + 0u, // deUint32 setLayoutCount; + DE_NULL, // const VkDescriptorSetLayout* pSetLayouts; + 0u, // deUint32 pushConstantRangeCount; + DE_NULL // const VkPushConstantRange* pPushConstantRanges; + }; + + m_preRasterizationStatePipelineLayout = createPipelineLayout(vk, vkDevice, &pipelineLayoutParams); + } { const VkPipelineLayoutCreateInfo pipelineLayoutParams = { @@ -1150,6 +1164,20 @@ void AttachmentFeedbackLoopLayoutDepthStencilImageSamplingInstance::setup (void) VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, // VkStructureType sType; DE_NULL, // const void* pNext; 0u, // VkPipelineLayoutCreateFlags flags; + 0u, // deUint32 setLayoutCount; + DE_NULL, // const VkDescriptorSetLayout* pSetLayouts; + 0u, // deUint32 pushConstantRangeCount; + DE_NULL // const VkPushConstantRange* pPushConstantRanges; + }; + + m_preRasterizationStatePipelineLayout = createPipelineLayout(vk, vkDevice, &pipelineLayoutParams); + } + { + const VkPipelineLayoutCreateInfo pipelineLayoutParams = + { + VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, // VkStructureType sType; + DE_NULL, // const void* pNext; + 0u, // VkPipelineLayoutCreateFlags flags; 1u, // deUint32 setLayoutCount; &m_descriptorSetLayout.get(), // const VkDescriptorSetLayout* pSetLayouts; 0u, // deUint32 pushConstantRangeCount; @@ -1222,8 +1250,8 @@ void AttachmentFeedbackLoopLayoutDepthStencilImageSamplingInstance::setup (void) 0u, // VkPipelineColorBlendStateCreateFlags flags; false, // VkBool32 logicOpEnable; VK_LOGIC_OP_COPY, // VkLogicOp logicOp; - (deUint32)m_imageCount, // deUint32 attachmentCount; - &colorBlendAttachmentStates[0], // const VkPipelineColorBlendAttachmentState* pAttachments; + 0u, // deUint32 attachmentCount; + DE_NULL, // const VkPipelineColorBlendAttachmentState* pAttachments; { 0.0f, 0.0f, 0.0f, 0.0f } // float blendConstants[4]; }; @@ -1547,7 +1575,8 @@ tcu::TestStatus AttachmentFeedbackLoopLayoutImageSamplingInstance::verifyImage(v m_context.getDefaultAllocator(), **m_colorImages[imgNdx], m_colorFormat, - renderSize)); + renderSize, + vk::VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT)); const tcu::ConstPixelBufferAccess result = resultTexture->getAccess(); const bool isIntegerFormat = isUintFormat(m_imageFormat) || isIntFormat(m_imageFormat); -- 2.7.4