mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 04:53:06 +01:00
Use swapchain's m_num only when attachment array has valid content
This commit is contained in:
@@ -1465,7 +1465,7 @@ namespace bgfx { namespace mtl
|
||||
|
||||
uint32_t numMrt = 1;
|
||||
FrameBufferHandle fbh = m_fbh;
|
||||
if (isValid(fbh) )
|
||||
if (isValid(fbh) && m_frameBuffers[fbh.idx].m_swapChain == NULL)
|
||||
{
|
||||
const FrameBufferMtl& fb = m_frameBuffers[fbh.idx];
|
||||
numMrt = bx::uint32_max(1, fb.m_num);
|
||||
|
||||
Reference in New Issue
Block a user