Initializers for attachment descriptions

This commit is contained in:
saschawillems 2016-04-30 10:45:39 +02:00
parent 81af6fe108
commit 8ee2687ced
2 changed files with 5 additions and 2 deletions

View file

@ -1386,7 +1386,9 @@ void VulkanExampleBase::setupFrameBuffer()
void VulkanExampleBase::setupRenderPass()
{
VkAttachmentDescription attachments[2];
VkAttachmentDescription attachments[2] = {};
// Color attachment
attachments[0].format = colorformat;
attachments[0].samples = VK_SAMPLE_COUNT_1_BIT;
attachments[0].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
@ -1396,6 +1398,7 @@ void VulkanExampleBase::setupRenderPass()
attachments[0].initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
attachments[0].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
// Depth attachment
attachments[1].format = depthFormat;
attachments[1].samples = VK_SAMPLE_COUNT_1_BIT;
attachments[1].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;