diff options
author | Matthew Netsch <quic_mnetsch@quicinc.com> | 2022-10-10 15:59:18 +0000 |
---|---|---|
committer | Matthew Netsch <quic_mnetsch@quicinc.com> | 2022-10-10 15:59:18 +0000 |
commit | 9425afa0d12a56f36fab9793bf9a1b53ff67d699 (patch) | |
tree | ad150ba2fc14ec0d35dd4abd5b4bfe493b422bc2 /external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp | |
parent | 3739dbc26ccf9d85007b20a47176d4c8fcedbd1c (diff) | |
parent | 5b7bf2e790fe6183eac8806db72854ff17782949 (diff) | |
download | VK-GL-CTS-9425afa0d12a56f36fab9793bf9a1b53ff67d699.tar.gz VK-GL-CTS-9425afa0d12a56f36fab9793bf9a1b53ff67d699.tar.bz2 VK-GL-CTS-9425afa0d12a56f36fab9793bf9a1b53ff67d699.zip |
Merge vk-gl-cts/vulkan-cts-1.3.3 into vk-gl-cts/main
Change-Id: I32090c113cd2300b3209cffe0b6fb4faf09a728b
Diffstat (limited to 'external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp')
-rw-r--r-- | external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp index 078f14f23..426f9f3e9 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp @@ -1820,8 +1820,9 @@ void beginCommandBuffer (const DeviceInterface& vk, inheritanceRenderingInfo.pColorAttachmentFormats = colorAttachmentFormats.data(); if (pRenderInfo->getDepthStencilAttachment()) { - inheritanceRenderingInfo.depthAttachmentFormat = pRenderInfo->getDepthStencilAttachment()->getFormat(); - inheritanceRenderingInfo.stencilAttachmentFormat = pRenderInfo->getDepthStencilAttachment()->getFormat(); + const VkFormat dsFormat = pRenderInfo->getDepthStencilAttachment()->getFormat(); + inheritanceRenderingInfo.depthAttachmentFormat = tcu::hasDepthComponent(mapVkFormat(dsFormat).order) ? dsFormat : VK_FORMAT_UNDEFINED; + inheritanceRenderingInfo.stencilAttachmentFormat = tcu::hasStencilComponent(mapVkFormat(dsFormat).order) ? dsFormat : VK_FORMAT_UNDEFINED; } if (pRenderInfo->getColorAttachmentCount()) @@ -2056,13 +2057,26 @@ Move<VkPipeline> createSubpassPipeline (const DeviceInterface& vk, for (deUint32 i = 0; i < renderInfo.getColorAttachmentCount(); ++i) colorAttachmentFormats.push_back(renderInfo.getColorAttachment(i).getFormat()); - vk::VkFormat depthStencilFormat = VK_FORMAT_UNDEFINED; + vk::VkFormat depthFormat = VK_FORMAT_UNDEFINED; + vk::VkFormat stencilFormat = VK_FORMAT_UNDEFINED; if (renderInfo.getDepthStencilAttachment()) { const Attachment& attachment = *renderInfo.getDepthStencilAttachment(); - depthStencilFormat = attachment.getFormat(); + vk::VkFormat depthStencilFormat = attachment.getFormat(); + if (depthStencilFormat != VK_FORMAT_UNDEFINED) + { + if (tcu::hasDepthComponent(mapVkFormat(depthStencilFormat).order)) + { + depthFormat = depthStencilFormat; + } + if (tcu::hasStencilComponent(mapVkFormat(depthStencilFormat).order)) + { + stencilFormat = depthStencilFormat; + } + } } + VkPipelineRenderingCreateInfoKHR renderingCreateInfo { VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR, @@ -2070,8 +2084,8 @@ Move<VkPipeline> createSubpassPipeline (const DeviceInterface& vk, 0u, static_cast<deUint32>(colorAttachmentFormats.size()), colorAttachmentFormats.data(), - depthStencilFormat, - depthStencilFormat + depthFormat, + stencilFormat }; #endif // CTS_USES_VULKANSC |