diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-06-29 01:42:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 01:42:05 +0200 |
commit | b2e7152180de09f38f68d45f1f49954733cfe7de (patch) | |
tree | ffd66174747f0b8ce13bbf1d8de748eaebb8c87e /drivers/vulkan/rendering_device_vulkan.cpp | |
parent | 89f270f4c5b1edf655966d11bc7b1ea14ad39a13 (diff) | |
parent | 4d19c052f749f8fbee5476eabccb28b23c78858e (diff) | |
download | redot-engine-b2e7152180de09f38f68d45f1f49954733cfe7de.tar.gz |
Merge pull request #49973 from reduz/fix-validation-layers-errors
Fix Context Validation Layer Errors
Diffstat (limited to 'drivers/vulkan/rendering_device_vulkan.cpp')
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 1539962803..6c4e590586 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -3524,7 +3524,10 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector<AttachmentF depth_stencil_reference.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; attachment_last_pass[attachment] = i; - if (!is_multisample_first) { + if (is_multisample_first) { + texture_samples = p_attachments[attachment].samples; + is_multisample_first = false; + } else { ERR_FAIL_COND_V_MSG(texture_samples != p_attachments[attachment].samples, VK_NULL_HANDLE, "Invalid framebuffer depth format attachment(" + itos(attachment) + "), in pass (" + itos(i) + "), if an attachment is marked as multisample, all of them should be multisample and use the same number of samples including the depth."); } |