Vulkan: unused resolve attachments must be marked as such
Change-Id: I61e1e6469c20149df5c6296ee237efced36a163c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28145 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
62442aceb0
commit
22e5e179fa
|
@ -161,6 +161,13 @@ namespace dawn_native { namespace vulkan {
|
||||||
++resolveAttachmentIndex;
|
++resolveAttachmentIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// All color attachments without a corresponding resolve attachment must be set to VK_ATTACHMENT_UNUSED
|
||||||
|
for (; resolveAttachmentIndex < colorAttachmentIndex; resolveAttachmentIndex++) {
|
||||||
|
auto& attachmentRef = resolveAttachmentRefs[resolveAttachmentIndex];
|
||||||
|
attachmentRef.attachment = VK_ATTACHMENT_UNUSED;
|
||||||
|
attachmentRef.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; // The Khronos Vulkan validation layer will complain if not set
|
||||||
|
}
|
||||||
|
|
||||||
VkAttachmentReference* resolveTargetAttachmentRefs =
|
VkAttachmentReference* resolveTargetAttachmentRefs =
|
||||||
query.resolveTargetMask.any() ? resolveAttachmentRefs.data() : nullptr;
|
query.resolveTargetMask.any() ? resolveAttachmentRefs.data() : nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue