c/client: Slightly improve barriers, taken from !360

Transplanted by Jakob, all the hard spec reading done by Ben.
This commit is contained in:
Benjamin Saunders 2020-07-14 17:24:43 +01:00 committed by Jakob Bornecrantz
parent c37dd46b0c
commit 1c78dd0246

View file

@ -395,10 +395,10 @@ client_vk_swapchain_create(struct xrt_compositor *xc,
.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
.srcAccessMask = 0,
.dstAccessMask = vk_swapchain_access_flags(info->bits),
.oldLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED,
.newLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
.srcQueueFamilyIndex = c->vk.queue_family_index,
.dstQueueFamilyIndex = c->vk.queue_family_index,
.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.image = sc->base.images[i],
.subresourceRange = subresource_range,
};
@ -408,9 +408,9 @@ client_vk_swapchain_create(struct xrt_compositor *xc,
.srcAccessMask = vk_swapchain_access_flags(info->bits),
.dstAccessMask = 0,
.oldLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
.newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
.newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
.srcQueueFamilyIndex = c->vk.queue_family_index,
.dstQueueFamilyIndex = c->vk.queue_family_index,
.dstQueueFamilyIndex = VK_QUEUE_FAMILY_EXTERNAL,
.image = sc->base.images[i],
.subresourceRange = subresource_range,
};