Parcourir la source

Vulkan: Fixing incorrect clear flags for the first color attachment

BearishSun il y a 9 ans
Parent
commit
e9bc1a9167
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      Source/BansheeVulkanRenderAPI/Source/BsVulkanFramebuffer.cpp

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

@@ -192,7 +192,7 @@ namespace bs
 				attachmentDesc.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
 				attachmentDesc.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
 				attachmentDesc.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
 				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.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
 				attachmentDesc.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
 				attachmentDesc.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;