MetalDevice: Fix depth not storing

This commit is contained in:
Stenzek 2023-12-09 13:23:12 +10:00
parent 1a5865bf95
commit c90de025bf
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -1778,6 +1778,7 @@ void MetalDevice::BeginRenderPass()
{ {
MetalTexture* const RT = m_current_render_targets[i]; MetalTexture* const RT = m_current_render_targets[i];
desc.colorAttachments[i].texture = RT->GetMTLTexture(); desc.colorAttachments[i].texture = RT->GetMTLTexture();
desc.colorAttachments[i].storeAction = MTLStoreActionStore;
RT->SetUseFenceCounter(m_current_fence_counter); RT->SetUseFenceCounter(m_current_fence_counter);
switch (RT->GetState()) switch (RT->GetState())
@ -1814,6 +1815,7 @@ void MetalDevice::BeginRenderPass()
if (MetalTexture* DS = m_current_depth_target) if (MetalTexture* DS = m_current_depth_target)
{ {
desc.depthAttachment.texture = m_current_depth_target->GetMTLTexture(); desc.depthAttachment.texture = m_current_depth_target->GetMTLTexture();
desc.depthAttachment.storeAction = MTLStoreActionStore;
DS->SetUseFenceCounter(m_current_fence_counter); DS->SetUseFenceCounter(m_current_fence_counter);
switch (DS->GetState()) switch (DS->GetState())