vk: Add support for XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT

This commit is contained in:
Jakob Bornecrantz 2020-07-23 16:26:13 +01:00 committed by Jakob Bornecrantz
parent b64d683f6e
commit ce7da3941c
2 changed files with 6 additions and 0 deletions

View file

@ -296,6 +296,9 @@ vk_create_image_from_native(struct vk_bundle *vk,
if ((info->bits & XRT_SWAPCHAIN_USAGE_SAMPLED) != 0) {
image_usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
}
if ((info->bits & XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT) != 0) {
image_usage |= VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
}
VkImageCreateInfo vk_info = {
.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,

View file

@ -87,6 +87,9 @@ create_image(struct vk_bundle *vk,
if ((info->bits & XRT_SWAPCHAIN_USAGE_SAMPLED) != 0) {
image_usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
}
if ((info->bits & XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT) != 0) {
image_usage |= VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
}
VkImageCreateInfo create_info = {
.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,