store action was not set when clearWithRenderPass false and MSAA on (#2613)

Co-authored-by: Cedric Guillemet <ceguille@microsoft.com>
This commit is contained in:
Cedric Guillemet
2021-09-30 20:26:18 +02:00
committed by GitHub
parent 89b6c25c4a
commit f9436baea3

View File

@@ -4000,6 +4000,18 @@ namespace bgfx { namespace mtl
if (desc.texture != NULL)
{
desc.loadAction = MTLLoadActionLoad;
if (NULL != m_capture
&& !isValid(fbh)
&& m_hasStoreActionStoreAndMultisampleResolve)
{
desc.storeAction = desc.texture.sampleCount > 1 ? MTLStoreActionStoreAndMultisampleResolve : MTLStoreActionStore;
}
else
{
desc.storeAction = desc.texture.sampleCount > 1 ? MTLStoreActionMultisampleResolve : MTLStoreActionStore;
}
}
}