From e42fe374c33138a84d5e959566be4a77546310f6 Mon Sep 17 00:00:00 2001 From: Kitchen Date: Wed, 9 Feb 2022 22:29:14 +0800 Subject: [PATCH] fix only msaa depth texutre in frame buffer error on iOS platform (#2725) --- src/renderer_mtl.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer_mtl.mm b/src/renderer_mtl.mm index ce2a345c3..60b861346 100644 --- a/src/renderer_mtl.mm +++ b/src/renderer_mtl.mm @@ -2145,6 +2145,10 @@ namespace bgfx { namespace mtl { const TextureMtl& texture = m_textures[frameBuffer.m_depthHandle.idx]; pd.depthAttachmentPixelFormat = texture.m_ptr.m_obj.pixelFormat; + pd.sampleCount = NULL != texture.m_ptrMsaa + ? texture.m_ptrMsaa.sampleCount() + : 1 + ; if (NULL != texture.m_ptrStencil) { pd.stencilAttachmentPixelFormat = texture.m_ptrStencil.m_obj.pixelFormat;