diff options
author | reduz <reduzio@gmail.com> | 2021-06-28 17:43:10 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-06-28 17:43:10 -0300 |
commit | 4d19c052f749f8fbee5476eabccb28b23c78858e (patch) | |
tree | ffd66174747f0b8ce13bbf1d8de748eaebb8c87e /drivers/vulkan/rendering_device_vulkan.cpp | |
parent | 89f270f4c5b1edf655966d11bc7b1ea14ad39a13 (diff) | |
download | redot-engine-4d19c052f749f8fbee5476eabccb28b23c78858e.tar.gz |
Fix Context Validation Layer Errors
* Multisampling was wrongly selected, possibly fixes #49937
* Image semaphore acquisition is now per window, possibly fixes #41614
Please make sure to test the above two issues again, since I can't reproduce either anyway.
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."); } |