Commit df48c027 by Jamie Madill Committed by Commit Bot

Vulkan: Don't request aliased FB attachments.

This produces undefined pixel values in GL. We can also return UNSUPPORTED if required and still be conformant. This fixes an assert in the gfx-rs portability implementation. Bug: angleproject:5601 Change-Id: Ifb84ad9b5e2365360a81cddba766b0bea81f2d51 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2668311 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent 18a5e7a6
...@@ -161,8 +161,7 @@ void UnpackAttachmentDesc(VkAttachmentDescription *desc, ...@@ -161,8 +161,7 @@ void UnpackAttachmentDesc(VkAttachmentDescription *desc,
uint8_t samples, uint8_t samples,
const PackedAttachmentOpsDesc &ops) const PackedAttachmentOpsDesc &ops)
{ {
// We would only need this flag for duplicated attachments. Apply it conservatively. desc->flags = 0;
desc->flags = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT;
desc->format = format.actualImageVkFormat(); desc->format = format.actualImageVkFormat();
desc->samples = gl_vk::GetSamples(samples); desc->samples = gl_vk::GetSamples(samples);
desc->loadOp = static_cast<VkAttachmentLoadOp>(ops.loadOp); desc->loadOp = static_cast<VkAttachmentLoadOp>(ops.loadOp);
...@@ -182,11 +181,7 @@ void UnpackColorResolveAttachmentDesc(VkAttachmentDescription *desc, ...@@ -182,11 +181,7 @@ void UnpackColorResolveAttachmentDesc(VkAttachmentDescription *desc,
bool usedAsInputAttachment, bool usedAsInputAttachment,
bool isInvalidated) bool isInvalidated)
{ {
// We would only need this flag for duplicated attachments. Apply it conservatively. In desc->flags = 0;
// practice it's unlikely any application would use the same image as multiple resolve
// attachments simultaneously, so this flag can likely be removed without any issue if it incurs
// a performance penalty.
desc->flags = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT;
desc->format = format.actualImageVkFormat(); desc->format = format.actualImageVkFormat();
// This function is for color resolve attachments. // This function is for color resolve attachments.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment