diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-26 11:08:53 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-26 11:08:53 +0200 |
| commit | 490e6362894337cd112b2d704f341b02e76864f4 (patch) | |
| tree | 5fe56ed62fbdcb1f4f2c2372fcb135a5320ec2fc /drivers | |
| parent | 0510191e499d1bef9597f7acc8801d79b8d41179 (diff) | |
| parent | b95e18f5575f1024b93613721220c7a29898b95e (diff) | |
| download | redot-engine-490e6362894337cd112b2d704f341b02e76864f4.tar.gz | |
Merge pull request #91169 from DarioSamo/render_pass_2_fallback_fix
Fix crash on compatibility fallback when vkCreateRenderPass2KHR is unavailable.
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/vulkan/rendering_device_driver_vulkan.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vulkan/rendering_device_driver_vulkan.cpp b/drivers/vulkan/rendering_device_driver_vulkan.cpp index 1906d168fe..803555cb07 100644 --- a/drivers/vulkan/rendering_device_driver_vulkan.cpp +++ b/drivers/vulkan/rendering_device_driver_vulkan.cpp @@ -1008,7 +1008,7 @@ VkResult RenderingDeviceDriverVulkan::_create_render_pass(VkDevice p_device, con const uint32_t depth_attachment_index = vector_base_index + 3; _convert_subpass_attachments(p_create_info->pSubpasses[i].pInputAttachments, p_create_info->pSubpasses[i].inputAttachmentCount, subpasses_attachments[input_attachments_index]); _convert_subpass_attachments(p_create_info->pSubpasses[i].pColorAttachments, p_create_info->pSubpasses[i].colorAttachmentCount, subpasses_attachments[color_attachments_index]); - _convert_subpass_attachments(p_create_info->pSubpasses[i].pResolveAttachments, p_create_info->pSubpasses[i].colorAttachmentCount, subpasses_attachments[resolve_attachments_index]); + _convert_subpass_attachments(p_create_info->pSubpasses[i].pResolveAttachments, (p_create_info->pSubpasses[i].pResolveAttachments != nullptr) ? p_create_info->pSubpasses[i].colorAttachmentCount : 0, subpasses_attachments[resolve_attachments_index]); _convert_subpass_attachments(p_create_info->pSubpasses[i].pDepthStencilAttachment, (p_create_info->pSubpasses[i].pDepthStencilAttachment != nullptr) ? 1 : 0, subpasses_attachments[depth_attachment_index]); // Ignores sType and pNext from the subpass. |
