mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #73622 from ChibiDenDen/patch-2
Fix use-after-free for VkAttachmentReference
This commit is contained in:
commit
ae21832823
1 changed files with 5 additions and 0 deletions
|
|
@ -101,6 +101,7 @@ VkResult VulkanContext::vkCreateRenderPass2KHR(VkDevice p_device, const VkRender
|
||||||
attachments.push_back(att);
|
attachments.push_back(att);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector<Vector<VkAttachmentReference>> attachment_references;
|
||||||
Vector<VkSubpassDescription> subpasses;
|
Vector<VkSubpassDescription> subpasses;
|
||||||
for (uint32_t i = 0; i < p_create_info->subpassCount; i++) {
|
for (uint32_t i = 0; i < p_create_info->subpassCount; i++) {
|
||||||
// Here we need to do more, again it's just stripping out type and next
|
// Here we need to do more, again it's just stripping out type and next
|
||||||
|
|
@ -124,6 +125,10 @@ VkResult VulkanContext::vkCreateRenderPass2KHR(VkDevice p_device, const VkRender
|
||||||
p_create_info->pSubpasses[i].preserveAttachmentCount, /* preserveAttachmentCount */
|
p_create_info->pSubpasses[i].preserveAttachmentCount, /* preserveAttachmentCount */
|
||||||
p_create_info->pSubpasses[i].pPreserveAttachments /* pPreserveAttachments */
|
p_create_info->pSubpasses[i].pPreserveAttachments /* pPreserveAttachments */
|
||||||
};
|
};
|
||||||
|
attachment_references.push_back(input_attachments);
|
||||||
|
attachment_references.push_back(color_attachments);
|
||||||
|
attachment_references.push_back(resolve_attachments);
|
||||||
|
attachment_references.push_back(depth_attachments);
|
||||||
|
|
||||||
subpasses.push_back(subpass);
|
subpasses.push_back(subpass);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue