summaryrefslogtreecommitdiffstats
path: root/drivers/vulkan/rendering_device_vulkan.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-06-29 01:42:05 +0200
committerGitHub <noreply@github.com>2021-06-29 01:42:05 +0200
commitb2e7152180de09f38f68d45f1f49954733cfe7de (patch)
treeffd66174747f0b8ce13bbf1d8de748eaebb8c87e /drivers/vulkan/rendering_device_vulkan.cpp
parent89f270f4c5b1edf655966d11bc7b1ea14ad39a13 (diff)
parent4d19c052f749f8fbee5476eabccb28b23c78858e (diff)
downloadredot-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.cpp5
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.");
}