diff --git a/examples/multisampling/multisampling.cpp b/examples/multisampling/multisampling.cpp index bf8644e9..2196cdeb 100644 --- a/examples/multisampling/multisampling.cpp +++ b/examples/multisampling/multisampling.cpp @@ -248,13 +248,13 @@ public: { // Overrides the virtual function of the base class - std::array attachments = {}; + std::array attachments = {}; // Multisampled attachment that we render to attachments[0].format = swapChain.colorFormat; attachments[0].samples = sampleCount; attachments[0].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; - attachments[0].storeOp = VK_ATTACHMENT_STORE_OP_STORE; + attachments[0].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; attachments[0].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; attachments[0].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; attachments[0].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; @@ -281,16 +281,6 @@ public: attachments[2].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; attachments[2].finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; - // Depth resolve attachment - attachments[3].format = depthFormat; - attachments[3].samples = VK_SAMPLE_COUNT_1_BIT; - attachments[3].loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; - attachments[3].storeOp = VK_ATTACHMENT_STORE_OP_STORE; - attachments[3].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; - attachments[3].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; - attachments[3].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; - attachments[3].finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; - VkAttachmentReference colorReference = {}; colorReference.attachment = 0; colorReference.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; @@ -357,14 +347,13 @@ public: { // Overrides the virtual function of the base class - std::array attachments; + std::array attachments; setupMultisampleTarget(); attachments[0] = multisampleTarget.color.view; // attachment[1] = swapchain image attachments[2] = multisampleTarget.depth.view; - attachments[3] = depthStencil.view; VkFramebufferCreateInfo frameBufferCreateInfo = {}; frameBufferCreateInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;