Skip to content

Commit

Permalink
Merge pull request #161 from mellinoe/fix-depthstencil-clear
Browse files Browse the repository at this point in the history
Fix an issue where the depth format in MVKCmdClearImage was not getting set correctly.
  • Loading branch information
billhollings committed May 22, 2018
2 parents f3355d1 + 8985ab9 commit 9e5e1ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MoltenVK/MoltenVK/Commands/MVKCmdTransfer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9e5e1ee

Please sign in to comment.