fix #255 [ci build]

This commit is contained in:
halx99 2020-11-05 22:51:33 +08:00
parent fefb5f27fb
commit fcaee3f0f9
1 changed files with 3 additions and 4 deletions

View File

@ -96,7 +96,7 @@ void RenderTargetMTL::applyRenderPassAttachments(const RenderPassParams& params,
#endif #endif
} }
if(bitmask::any(this->_flags, RenderTargetFlag::DEPTH)) { if(bitmask::any(this->_flags, RenderTargetFlag::DEPTH_AND_STENCIL)) {
auto depthAttachment = getDepthAttachment(); auto depthAttachment = getDepthAttachment();
if(depthAttachment){ if(depthAttachment){
descriptor.depthAttachment.texture = depthAttachment.texture; descriptor.depthAttachment.texture = depthAttachment.texture;
@ -106,9 +106,7 @@ void RenderTargetMTL::applyRenderPassAttachments(const RenderPassParams& params,
descriptor.depthAttachment.storeAction = getStoreAction(params, TargetBufferFlags::DEPTH); descriptor.depthAttachment.storeAction = getStoreAction(params, TargetBufferFlags::DEPTH);
descriptor.depthAttachment.clearDepth = params.clearDepthValue; descriptor.depthAttachment.clearDepth = params.clearDepthValue;
} }
}
if(bitmask::any(this->_flags, RenderTargetFlag::STENCIL)) {
auto stencilAttachment = getStencilAttachment(); auto stencilAttachment = getStencilAttachment();
if(stencilAttachment) { if(stencilAttachment) {
descriptor.stencilAttachment.texture = stencilAttachment.texture; descriptor.stencilAttachment.texture = stencilAttachment.texture;
@ -119,6 +117,7 @@ void RenderTargetMTL::applyRenderPassAttachments(const RenderPassParams& params,
descriptor.stencilAttachment.clearStencil = params.clearStencilValue; descriptor.stencilAttachment.clearStencil = params.clearStencilValue;
} }
} }
#if 0 #if 0
if (multisampledDepth) { if (multisampledDepth) {
// We're rendering into our temporary MSAA texture and doing an automatic resolve. // We're rendering into our temporary MSAA texture and doing an automatic resolve.