From 25e6470e18ba23bc2d2f98bc56ff07cfd5d787e3 Mon Sep 17 00:00:00 2001 From: Matthew Netsch Date: Wed, 17 Aug 2022 19:32:00 +0000 Subject: [PATCH] Reintroduce tests for VK_EXT_color_write_enable extension Adding tests back in to enable coverage for this feature VK-GL-CTS Issue: 3759 Components: Vulkan Affects: dEQP-VK.pipeline.*.color_write_enable_maxa.cwe_after_bind.* dEQP-VK.pipeline.*.color_write_enable_maxa.cwe_before_bind.* Change-Id: Ia43d495097038272df407ac633a05ce729af3ea3 --- .../pipeline/vktPipelineColorWriteEnableTests.cpp | 26 ++++++---------------- .../vulkancts/mustpass/main/src/test-issues.txt | 6 +---- .../vk-default/pipeline/fast-linked-library.txt | 24 ++++++++++++++++++++ .../main/vk-default/pipeline/monolithic.txt | 24 ++++++++++++++++++++ .../main/vk-default/pipeline/pipeline-library.txt | 24 ++++++++++++++++++++ 5 files changed, 80 insertions(+), 24 deletions(-) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineColorWriteEnableTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineColorWriteEnableTests.cpp index 4ce8ba8..d0c3488 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineColorWriteEnableTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineColorWriteEnableTests.cpp @@ -289,6 +289,7 @@ void ColorWriteEnableTest::checkSupport (Context& context) const if ((colorProperties.optimalTilingFeatures & kColorFeatures) != kColorFeatures) TCU_THROW(NotSupportedError, "Required color image features not supported"); + checkPipelineLibraryRequirements(vki, physicalDevice, m_testConfig.pipelineConstructionType); } @@ -1508,7 +1509,7 @@ void ColorWriteEnable2Instance::setupAndBuildPipeline (GraphicsPipelineWrapperEx &vertexAttrib // const VkVertexInputAttributeDescription* pVertexAttributeDescriptions; }; - const vk::VkPipelineInputAssemblyStateCreateInfo inputAssemblyStateCreateInfo + const VkPipelineInputAssemblyStateCreateInfo inputAssemblyStateCreateInfo { VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, // VkStructureType sType; nullptr, // const void* pNext; @@ -1568,10 +1569,13 @@ void ColorWriteEnable2Instance::setupAndBuildPipeline (GraphicsPipelineWrapperEx colorWriteEnables.data() // const VkBool32* pColorWriteEnables; }; + const bool cweAllowed = (dynamic && m_params.colorWriteEnables); + owner.m_isDynamicColorWriteEnable = cweAllowed; + const VkPipelineColorBlendStateCreateInfo colorBlendStateCreateInfo { VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, // VkStructureType sType - &colorWriteCreateInfo, // const void* pNext + cweAllowed ? nullptr : &colorWriteCreateInfo, // const void* pNext 0u, // VkPipelineColorBlendStateCreateFlags flags VK_FALSE, // VkBool32 logicOpEnable VK_LOGIC_OP_CLEAR, // VkLogicOp logicOp @@ -1580,9 +1584,6 @@ void ColorWriteEnable2Instance::setupAndBuildPipeline (GraphicsPipelineWrapperEx { blendComp, blendComp, blendComp, blendComp } // float blendConstants[4] }; - const bool cweAllowed = (dynamic && m_params.colorWriteEnables); - owner.m_isDynamicColorWriteEnable = cweAllowed; - owner .setDefaultRasterizationState() .setDefaultDepthStencilState() @@ -1641,7 +1642,7 @@ TestStatus ColorWriteEnable2Instance::iterate (void) ColorWriteEnables writeEnables (attachmentCount + m_params.attachmentMore, VK_TRUE); for (deUint32 i = 0; i < attachmentCount; ++i) writeEnables[i] = (i % 2) ? VK_TRUE : VK_FALSE; - Move pipelineLayout = makePipelineLayout(m_vkd, m_device, 0u, nullptr, 0u, nullptr); + Move pipelineLayout = makePipelineLayout(m_vkd, m_device, 0u, nullptr, 0u, nullptr); std::vector> renderPasses; std::vector framebuffers; std::vector pipelines; @@ -1657,12 +1658,6 @@ TestStatus ColorWriteEnable2Instance::iterate (void) setupAndBuildPipeline(pipelines.back(), *pipelineLayout, *renderPasses[i], (i+1), writeEnables, blendComp, dynamicColorWriteEnable); } - - const VkImageSubresourceRange attachmentResource = makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u); - VkImageMemoryBarrier attachmentReady = makeImageMemoryBarrier(VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_TRANSFER_READ_BIT, - VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - VkImage(0), attachmentResource); - Move cmdPool = makeCommandPool(m_vkd, m_device, queueIndex); Move cmdBuff = allocateCommandBuffer(m_vkd, m_device, *cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY); @@ -1687,13 +1682,6 @@ TestStatus ColorWriteEnable2Instance::iterate (void) beginRenderPass(m_vkd, *cmdBuff, *renderPasses[a], *framebuffers[a].framebuffer, renderArea, attachmentCount, clearValues.data()); m_vkd.cmdDraw(*cmdBuff, 6u, 1u, 0u, (a + 1)); endRenderPass(m_vkd, *cmdBuff); - - for (Attachment& attachment : framebuffers[a].attachments) - { - attachmentReady.image = **attachment.image; - m_vkd.cmdPipelineBarrier(*cmdBuff, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, - VK_DEPENDENCY_VIEW_LOCAL_BIT, 0, nullptr, 0, nullptr, 1u, &attachmentReady); - } } endCommandBuffer(m_vkd, *cmdBuff); diff --git a/external/vulkancts/mustpass/main/src/test-issues.txt b/external/vulkancts/mustpass/main/src/test-issues.txt index 5606c04..79e3770 100644 --- a/external/vulkancts/mustpass/main/src/test-issues.txt +++ b/external/vulkancts/mustpass/main/src/test-issues.txt @@ -9,8 +9,4 @@ dEQP-VK.glsl.texture_functions.texturegradoffset.usampler2darray_vertex dEQP-VK.ray_tracing_pipeline.acceleration_structures.query_pool_results.cpu.memory.size dEQP-VK.ray_tracing_pipeline.acceleration_structures.query_pool_results.cpu.buffer.size dEQP-VK.ray_tracing_pipeline.acceleration_structures.query_pool_results.gpu.memory.size -dEQP-VK.ray_tracing_pipeline.acceleration_structures.query_pool_results.gpu.buffer.size - -# Issue 3759: dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.* creates an invalid pColorBlendState -dEQP-VK.pipeline.*.color_write_enable_maxa.cwe_after_bind.* -dEQP-VK.pipeline.*.color_write_enable_maxa.cwe_before_bind.* +dEQP-VK.ray_tracing_pipeline.acceleration_structures.query_pool_results.gpu.buffer.size \ No newline at end of file diff --git a/external/vulkancts/mustpass/main/vk-default/pipeline/fast-linked-library.txt b/external/vulkancts/mustpass/main/vk-default/pipeline/fast-linked-library.txt index fd269b4..aa2e8eb 100644 --- a/external/vulkancts/mustpass/main/vk-default/pipeline/fast-linked-library.txt +++ b/external/vulkancts/mustpass/main/vk-default/pipeline/fast-linked-library.txt @@ -220025,3 +220025,27 @@ dEQP-VK.pipeline.fast_linked_library.color_write_enable.no_channels.static.disab dEQP-VK.pipeline.fast_linked_library.color_write_enable.no_channels.static.disable_last dEQP-VK.pipeline.fast_linked_library.color_write_enable.no_channels.static.disable_first_and_second dEQP-VK.pipeline.fast_linked_library.color_write_enable.no_channels.static.disable_second_and_last +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments3_more0 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments3_more1 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments3_more2 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments3_more3 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments4_more0 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments4_more1 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments4_more2 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments4_more3 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments5_more0 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments5_more1 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments5_more2 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_before_bind.attachments5_more3 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments3_more0 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments3_more1 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments3_more2 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments3_more3 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments4_more0 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments4_more1 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments4_more2 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments4_more3 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments5_more0 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments5_more1 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments5_more2 +dEQP-VK.pipeline.fast_linked_library.color_write_enable_maxa.cwe_after_bind.attachments5_more3 diff --git a/external/vulkancts/mustpass/main/vk-default/pipeline/monolithic.txt b/external/vulkancts/mustpass/main/vk-default/pipeline/monolithic.txt index af752e5..36021b7 100644 --- a/external/vulkancts/mustpass/main/vk-default/pipeline/monolithic.txt +++ b/external/vulkancts/mustpass/main/vk-default/pipeline/monolithic.txt @@ -220983,6 +220983,30 @@ dEQP-VK.pipeline.monolithic.color_write_enable.no_channels.static.disable_second dEQP-VK.pipeline.monolithic.color_write_enable.no_channels.static.disable_last dEQP-VK.pipeline.monolithic.color_write_enable.no_channels.static.disable_first_and_second dEQP-VK.pipeline.monolithic.color_write_enable.no_channels.static.disable_second_and_last +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments3_more0 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments3_more1 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments3_more2 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments3_more3 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments4_more0 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments4_more1 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments4_more2 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments4_more3 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments5_more0 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments5_more1 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments5_more2 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_before_bind.attachments5_more3 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments3_more0 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments3_more1 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments3_more2 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments3_more3 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments4_more0 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments4_more1 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments4_more2 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments4_more3 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments5_more0 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments5_more1 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments5_more2 +dEQP-VK.pipeline.monolithic.color_write_enable_maxa.cwe_after_bind.attachments5_more3 dEQP-VK.pipeline.monolithic.misc.position_to_ssbo dEQP-VK.pipeline.monolithic.misc.primitive_id_from_tess dEQP-VK.pipeline.monolithic.derivative.compute.derivative_by_handle diff --git a/external/vulkancts/mustpass/main/vk-default/pipeline/pipeline-library.txt b/external/vulkancts/mustpass/main/vk-default/pipeline/pipeline-library.txt index 1a1ba00..216d83d 100644 --- a/external/vulkancts/mustpass/main/vk-default/pipeline/pipeline-library.txt +++ b/external/vulkancts/mustpass/main/vk-default/pipeline/pipeline-library.txt @@ -220025,6 +220025,30 @@ dEQP-VK.pipeline.pipeline_library.color_write_enable.no_channels.static.disable_ dEQP-VK.pipeline.pipeline_library.color_write_enable.no_channels.static.disable_last dEQP-VK.pipeline.pipeline_library.color_write_enable.no_channels.static.disable_first_and_second dEQP-VK.pipeline.pipeline_library.color_write_enable.no_channels.static.disable_second_and_last +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments3_more0 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments3_more1 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments3_more2 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments3_more3 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments4_more0 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments4_more1 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments4_more2 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments4_more3 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments5_more0 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments5_more1 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments5_more2 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_before_bind.attachments5_more3 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments3_more0 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments3_more1 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments3_more2 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments3_more3 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments4_more0 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments4_more1 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments4_more2 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments4_more3 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments5_more0 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments5_more1 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments5_more2 +dEQP-VK.pipeline.pipeline_library.color_write_enable_maxa.cwe_after_bind.attachments5_more3 dEQP-VK.pipeline.pipeline_library.graphics_library.fast.4 dEQP-VK.pipeline.pipeline_library.graphics_library.fast.0_1111 dEQP-VK.pipeline.pipeline_library.graphics_library.fast.0_112 -- 2.7.4