Add support for VK_KHR_dynamic_rendering

This commit is contained in:
baldurk committed 2021-11-05 14:15:01 +00:00
1 parent 5bee64904c
commit bb3343786b
31 files changed
+2671 -478

No files matched your search

@@ -878,6 +878,22 @@ void VulkanShaderCache::MakeGraphicsPipelineInfo(VkGraphicsPipelineCreateInfo &p
0, // base pipeline index
};
static VkFormat colFormats[16] = {};
static VkPipelineRenderingCreateInfoKHR dynRenderCreate = {
VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR, NULL, pipeInfo.viewMask, 0, colFormats,
};
if(pipeInfo.renderpass == ResourceId())
{
dynRenderCreate.depthAttachmentFormat = pipeInfo.depthFormat;
dynRenderCreate.stencilAttachmentFormat = pipeInfo.depthFormat;
dynRenderCreate.colorAttachmentCount = (uint32_t)pipeInfo.colorFormats.size();
memcpy(colFormats, pipeInfo.colorFormats.data(), pipeInfo.colorFormats.byteSize());
dynRenderCreate.pNext = ret.pNext;
ret.pNext = &dynRenderCreate;
}
static VkPipelineDiscardRectangleStateCreateInfoEXT discardRects = {
VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT,
};