Fix basic dynamic rendering tests
Create pipeline with correct information for depth/stencil
and correctly inherit in secondary command buffers.
Affects:
dEQP-VK.dynamic_rendering.basic.*
Components: Vulkan
VK-GL-CTS issue: 3939
Change-Id: Ide926862c5272d7ef5cafcaf40b47e338b071edb
diff --git a/external/vulkancts/modules/vulkan/renderpass/vktDynamicRenderingTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktDynamicRenderingTests.cpp
index 4beea1c..eff0b10 100644
--- a/external/vulkancts/modules/vulkan/renderpass/vktDynamicRenderingTests.cpp
+++ b/external/vulkancts/modules/vulkan/renderpass/vktDynamicRenderingTests.cpp
@@ -296,7 +296,8 @@
const UVec2 renderSize,
const deUint32 colorAttachmentCount,
const VkFormat* pColorAttachmentFormats,
- const VkFormat depthStencilAttachmentFormat)
+ const VkFormat depthAttachmentFormat,
+ const VkFormat stencilAttachmentFormat)
{
const VkVertexInputBindingDescription vertexInputBindingDescription =
{
@@ -469,8 +470,8 @@
0u, // deUint32 viewMask;
colorAttachmentCount, // deUint32 colorAttachmentCount;
pColorAttachmentFormats, // const VkFormat* pColorAttachmentFormats;
- depthStencilAttachmentFormat, // VkFormat depthAttachmentFormat;
- depthStencilAttachmentFormat, // VkFormat stencilAttachmentFormat;
+ depthAttachmentFormat, // VkFormat depthAttachmentFormat;
+ stencilAttachmentFormat, // VkFormat stencilAttachmentFormat;
};
const VkGraphicsPipelineCreateInfo graphicsPipelineInfo =
@@ -623,8 +624,6 @@
const deUint32 colorAttachmentCount,
const ImagesFormat& imagesFormat)
{
- const VkFormat depthStencilFormat = (imagesFormat.depth != VK_FORMAT_UNDEFINED) ?
- imagesFormat.depth : imagesFormat.stencil;
const VkCommandBufferInheritanceRenderingInfoKHR inheritanceRenderingInfo
{
VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR, // VkStructureType sType;
@@ -633,8 +632,8 @@
0u, // uint32_t viewMask;
colorAttachmentCount, // uint32_t colorAttachmentCount;
(colorAttachmentCount > 0) ? imagesFormat.colors : DE_NULL, // const VkFormat* pColorAttachmentFormats;
- depthStencilFormat, // VkFormat depthAttachmentFormat;
- depthStencilFormat, // VkFormat stencilAttachmentFormat;
+ imagesFormat.depth, // VkFormat depthAttachmentFormat;
+ imagesFormat.stencil, // VkFormat stencilAttachmentFormat;
VK_SAMPLE_COUNT_1_BIT, // VkSampleCountFlagBits rasterizationSamples;
};
@@ -840,7 +839,7 @@
Move<VkPipeline> pipeline = makeGraphicsPipeline(vk, device, *m_pipelineLayout,
*m_vertexModule, *m_fragmentModule,
m_parameters.renderSize, colorAtchCount, imagesFormat.colors,
- ((imagesFormat.depth == VK_FORMAT_UNDEFINED) ? imagesFormat.stencil : imagesFormat.depth));
+ imagesFormat.depth, imagesFormat.stencil);
rendering(*pipeline, attachmentBindInfos, colorAtchCount, imagesLayout, imagesFormat);
}