Sfoglia il codice sorgente

Vulkan: Fixing incorrect clear flags for the first color attachment

BearishSun 9 anni fa
parent
commit
e9bc1a9167

+ 1 - 1
Source/BansheeVulkanRenderAPI/Source/BsVulkanFramebuffer.cpp

@@ -192,7 +192,7 @@ namespace bs
 				attachmentDesc.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
 				attachmentDesc.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
 			}
-			else if (clearMask.isSet((ClearMaskBits)(i << attachment.index)))
+			else if (clearMask.isSet((ClearMaskBits)(1 << attachment.index)))
 			{
 				attachmentDesc.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
 				attachmentDesc.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;