Vulkan: Fix minor bug when clearing the back buffer (loaded stencil for no reason)

This commit is contained in:
Henrik Rydgård 2017-05-31 11:41:21 +02:00
parent 82df6af4c6
commit 33d4f8c7ad

View file

@ -1129,7 +1129,7 @@ void VulkanContext::InitSurfaceRenderPass(bool include_depth, bool clear) {
attachments[1].samples = VK_SAMPLE_COUNT_1_BIT;
attachments[1].loadOp = clear ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_LOAD;
attachments[1].storeOp = VK_ATTACHMENT_STORE_OP_STORE;
attachments[1].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
attachments[1].stencilLoadOp = clear ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_LOAD;
attachments[1].stencilStoreOp = VK_ATTACHMENT_STORE_OP_STORE;
attachments[1].initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
attachments[1].finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;