const deUint32 numSubpasses = m_renderType == RENDER_TYPE_DEPTHSTENCIL_ONLY ? 2u : 1u;
for (deUint32 subpassIdx = 0; subpassIdx < numSubpasses; subpassIdx++)
+ {
+ if (m_renderType == RENDER_TYPE_DEPTHSTENCIL_ONLY)
+ {
+ if (subpassIdx == 0)
+ {
+ colorBlendStateParams.attachmentCount = 0;
+ }
+ else
+ {
+ colorBlendStateParams.attachmentCount = 1;
+ }
+ }
for (deUint32 i = 0u; i < numTopologies; ++i)
{
- m_graphicsPipelines.push_back(VkPipelineSp(new Unique<VkPipeline>(makeGraphicsPipeline(vk, // const DeviceInterface& vk
- vkDevice, // const VkDevice device
- *m_pipelineLayout, // const VkPipelineLayout pipelineLayout
- *m_vertexShaderModule, // const VkShaderModule vertexShaderModule
- DE_NULL, // const VkShaderModule tessellationControlModule
- DE_NULL, // const VkShaderModule tessellationEvalModule
- DE_NULL, // const VkShaderModule geometryShaderModule
- *m_fragmentShaderModule, // const VkShaderModule fragmentShaderModule
- *m_renderPass, // const VkRenderPass renderPass
- viewports, // const std::vector<VkViewport>& viewports
- scissors, // const std::vector<VkRect2D>& scissors
- pTopology[i], // const VkPrimitiveTopology topology
- subpassIdx, // const deUint32 subpass
- 0u, // const deUint32 patchControlPoints
- &vertexInputStateParams, // const VkPipelineVertexInputStateCreateInfo* vertexInputStateCreateInfo
- DE_NULL, // const VkPipelineRasterizationStateCreateInfo* rasterizationStateCreateInfo
- &m_multisampleStateParams, // const VkPipelineMultisampleStateCreateInfo* multisampleStateCreateInfo
- &depthStencilStateParams, // const VkPipelineDepthStencilStateCreateInfo* depthStencilStateCreateInfo
- &colorBlendStateParams)))); // const VkPipelineColorBlendStateCreateInfo* colorBlendStateCreateInfo
+ const VkPipelineInputAssemblyStateCreateInfo inputAssemblyStateCreateInfo
+ {
+ VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, // VkStructureType sType
+ DE_NULL, // const void* pNext
+ 0u, // VkPipelineInputAssemblyStateCreateFlags flags
+ pTopology[i], // VkPrimitiveTopology topology
+ VK_FALSE // VkBool32 primitiveRestartEnable
+ };
+
+ const VkGraphicsPipelineCreateInfo pipelineCreateInfo
+ {
+ VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, // VkStructureType sType
+ m_useFragmentShadingRate ? &shadingRateStateCreateInfo : DE_NULL, // const void* pNext
+ 0u, // VkPipelineCreateFlags flags
+ (deUint32)pipelineShaderStageParams.size(), // deUint32 stageCount
+ &pipelineShaderStageParams[0], // const VkPipelineShaderStageCreateInfo* pStages
+ &vertexInputStateParams, // const VkPipelineVertexInputStateCreateInfo* pVertexInputState
+ &inputAssemblyStateCreateInfo, // const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
+ DE_NULL, // const VkPipelineTessellationStateCreateInfo* pTessellationState
+ &viewportStateCreateInfo, // const VkPipelineViewportStateCreateInfo* pViewportState
+ &rasterizationStateCreateInfo, // const VkPipelineRasterizationStateCreateInfo* pRasterizationState
+ &m_multisampleStateParams, // const VkPipelineMultisampleStateCreateInfo* pMultisampleState
+ &depthStencilStateParams, // const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
+ &colorBlendStateParams, // const VkPipelineColorBlendStateCreateInfo* pColorBlendState
+ DE_NULL, // const VkPipelineDynamicStateCreateInfo* pDynamicState
+ *m_pipelineLayout, // VkPipelineLayout layout
+ *m_renderPass, // VkRenderPass renderPass
+ subpassIdx, // deUint32 subpass
+ DE_NULL, // VkPipeline basePipelineHandle
+ 0 // deInt32 basePipelineIndex;
+ };
+
+ m_graphicsPipelines.push_back(VkPipelineSp(new Unique<VkPipeline>(createGraphicsPipeline(vk, vkDevice, DE_NULL, &pipelineCreateInfo))));
}
+ }
}
if (m_renderType == RENDER_TYPE_COPY_SAMPLES)