/* TASK01:检查动态渲染的设置
*
* 这个新结构体取代了之前在管线创建中的渲染通道。
* 请注意,此结构体现在通过下面的 .pNext 链接,而 .renderPass 不再使用。
*/
vk::PipelineRenderingCreateInfo pipelineRenderingCreateInfo{
.colorAttachmentCount = 1,
.pColorAttachmentFormats = &swapChainImageFormat,
.depthAttachmentFormat = depthFormat
};
vk::GraphicsPipelineCreateInfo pipelineInfo{
.pNext = &pipelineRenderingCreateInfo,
.stageCount = 2,
.pStages = shaderStages,
.pVertexInputState = &vertexInputInfo,
.pInputAssemblyState = &inputAssembly,
.pViewportState = &viewportState,
.pRasterizationState = &rasterizer,
.pMultisampleState = &multisampling,
.pDepthStencilState = &depthStencil,
.pColorBlendState = &colorBlending,
.pDynamicState = &dynamicState,
.layout = pipelineLayout,
.renderPass = nullptr
};
graphicsPipeline = vk::raii::Pipeline(device, nullptr, pipelineInfo);