Framebuffer image final layout

This commit is contained in:
saschawillems 2016-09-03 11:19:38 +02:00
parent 5e3b0f4b75
commit 0261fc27ba

View file

@ -215,13 +215,6 @@ namespace vk
attachment.description.format = createinfo.format;
attachment.description.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
// Final layout
if ((createinfo.usage & VK_IMAGE_USAGE_SAMPLED_BIT))
{
// If sampled, final layout is always SHADER_READ
attachment.description.finalLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
}
else
{
// If not, final layout depends on attachment type
if (attachment.hasDepth() || attachment.hasStencil())
{
@ -231,7 +224,6 @@ namespace vk
{
attachment.description.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
}
}
attachments.push_back(attachment);