Explorar o código

Vulkan: Fixing incorrect clear flags for the first color attachment

BearishSun %!s(int64=9) %!d(string=hai) anos
pai
achega
e9bc1a9167

+ 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;