Fix an issue where the depth format in MVKCmdClearImage was not getting set correctly.

This commit is contained in:
Eric Mellino 2018-05-19 22:14:27 -07:00
parent d5272484ac
commit 8985ab9131

View File

@ -875,6 +875,7 @@ void MVKCmdClearImage::setContent(VkImage image,
if (_isDepthStencilClear) {
_rpsKey.enable(kMVKAttachmentFormatDepthStencilIndex);
_rpsKey.attachmentMTLPixelFormats[kMVKAttachmentFormatDepthStencilIndex] = _image->getMTLPixelFormat();
float mtlDepthVal = mvkMTLClearDepthFromVkClearValue(clearValue);
_clearColors[kMVKAttachmentFormatDepthStencilIndex] = { mtlDepthVal, mtlDepthVal, mtlDepthVal, mtlDepthVal };
_mtlStencilValue = mvkMTLClearStencilFromVkClearValue(clearValue);