diff options
author | Matthew Netsch <quic_mnetsch@quicinc.com> | 2022-10-06 14:08:48 -0700 |
---|---|---|
committer | Matthew Netsch <quic_mnetsch@quicinc.com> | 2022-10-06 14:08:48 -0700 |
commit | ae4c5e260ebbfe8f8105c453082c361701cea8d9 (patch) | |
tree | 53f101376cbb4808290335280651325acc83fbf0 /external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp | |
parent | 98a72b104b166792c21cce569a1a18d407ff758f (diff) | |
parent | fef7e1a755d84cf4cb42e41e2f0510c223b1f91a (diff) | |
download | VK-GL-CTS-ae4c5e260ebbfe8f8105c453082c361701cea8d9.tar.gz VK-GL-CTS-ae4c5e260ebbfe8f8105c453082c361701cea8d9.tar.bz2 VK-GL-CTS-ae4c5e260ebbfe8f8105c453082c361701cea8d9.zip |
Merge vk-gl-cts/vulkan-cts-1.2.8 into vk-gl-cts/vulkan-cts-1.3.0
Change-Id: Iccd8336664b28aaa5c009f7da85295995a8297eb
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 c92d71e5d..36f73fb85 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp @@ -1814,8 +1814,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()) inheritanceRenderingInfo.rasterizationSamples = pRenderInfo->getColorAttachment(0).getSamples(); @@ -2035,13 +2036,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, @@ -2049,8 +2063,8 @@ Move<VkPipeline> createSubpassPipeline (const DeviceInterface& vk, 0u, static_cast<deUint32>(colorAttachmentFormats.size()), colorAttachmentFormats.data(), - depthStencilFormat, - depthStencilFormat + depthFormat, + stencilFormat }; return makeGraphicsPipeline(vk, // const DeviceInterface& vk |