Fix vulkan input usage flag for VulkanWindowContext.

Change-Id: I8ab093c68e0c70d78722589bcfd28934f2cf5cb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321517
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
Greg Daniel 2020-10-01 15:03:23 -04:00 committed by Skia Commit-Bot
parent 6d32686824
commit 280a4de999

View File

@ -216,10 +216,12 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
}
VkImageUsageFlags usageFlags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT |
VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
VK_IMAGE_USAGE_TRANSFER_DST_BIT;
SkASSERT((caps.supportedUsageFlags & usageFlags) == usageFlags);
if (caps.supportedUsageFlags & VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT) {
usageFlags |= VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
}
SkASSERT(caps.supportedTransforms & caps.currentTransform);
SkASSERT(caps.supportedCompositeAlpha & (VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR |
VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR));