From 8985ab91317452af2e6ad2a445c9074ee7f56c79 Mon Sep 17 00:00:00 2001 From: Eric Mellino Date: Sat, 19 May 2018 22:14:27 -0700 Subject: [PATCH] Fix an issue where the depth format in MVKCmdClearImage was not getting set correctly. --- MoltenVK/MoltenVK/Commands/MVKCmdTransfer.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/MoltenVK/MoltenVK/Commands/MVKCmdTransfer.mm b/MoltenVK/MoltenVK/Commands/MVKCmdTransfer.mm index 2e84f061a..d80afbe49 100644 --- a/MoltenVK/MoltenVK/Commands/MVKCmdTransfer.mm +++ b/MoltenVK/MoltenVK/Commands/MVKCmdTransfer.mm @@ -875,6 +875,7 @@ if (_isDepthStencilClear) { _rpsKey.enable(kMVKAttachmentFormatDepthStencilIndex); + _rpsKey.attachmentMTLPixelFormats[kMVKAttachmentFormatDepthStencilIndex] = _image->getMTLPixelFormat(); float mtlDepthVal = mvkMTLClearDepthFromVkClearValue(clearValue); _clearColors[kMVKAttachmentFormatDepthStencilIndex] = { mtlDepthVal, mtlDepthVal, mtlDepthVal, mtlDepthVal }; _mtlStencilValue = mvkMTLClearStencilFromVkClearValue(clearValue);