Framebuffer image final layout
This commit is contained in:
parent
5e3b0f4b75
commit
0261fc27ba
1 changed files with 4 additions and 12 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue