From b6f32213df92d58730861ed0d5a9134c11a177c0 Mon Sep 17 00:00:00 2001 From: ziga-lunarg Date: Tue, 17 Jan 2023 12:31:56 +0100 Subject: [PATCH] Fix colorAttachmentCount mismatch in stencil tests pColorBlendState::attachmentCount must match colorAttachmentCount of the subpass used in the pipeline Components: Vulkan VK-GL-CTS issue: 4229 Affected tests: dEQP-VK.pipeline.*.stencil.* Change-Id: I1656cda0af45ae3df65c25790e360a17863273d4 --- .../vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp index 4a2de9b..c2fb356 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp @@ -616,7 +616,7 @@ StencilTestInstance::StencilTestInstance (Context& context, 0u, // VkPipelineColorBlendStateCreateFlags flags VK_FALSE, // VkBool32 logicOpEnable vk::VK_LOGIC_OP_CLEAR, // VkLogicOp logicOp - 1u, // deUint32 attachmentCount + m_colorAttachmentEnable ? 1u : 0u, // deUint32 attachmentCount &blendState, // const VkPipelineColorBlendAttachmentState* pAttachments { 1.0f, 1.0f, 1.0f, 1.0f } // float blendConstants[4] }; @@ -638,7 +638,6 @@ StencilTestInstance::StencilTestInstance (Context& context, m_graphicsPipelines[quadNdx].setDefaultRasterizerDiscardEnable(!m_colorAttachmentEnable) .setDefaultMultisampleState() - .setDefaultColorBlendState() .setupVertexInputStete(&vertexInputStateParams) .setupPreRasterizationShaderState(viewports, scissors, @@ -648,7 +647,7 @@ StencilTestInstance::StencilTestInstance (Context& context, *m_vertexShaderModule, &rasterizationStateParams) .setupFragmentShaderState(*m_pipelineLayout, *m_renderPass, 0u, *m_fragmentShaderModule, &depthStencilStateParams) - .setupFragmentOutputState(*m_renderPass, 0, (m_colorAttachmentEnable ? &colorBlendStateParams : DE_NULL)) + .setupFragmentOutputState(*m_renderPass, 0, &colorBlendStateParams) .setMonolithicPipelineLayout(*m_pipelineLayout) .buildPipeline(); } -- 2.7.4