From c90de025bf3a442db5f2be291568a92f985b6140 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 9 Dec 2023 13:23:12 +1000 Subject: [PATCH] MetalDevice: Fix depth not storing --- src/util/metal_device.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/metal_device.mm b/src/util/metal_device.mm index effce55cac..2394a61889 100644 --- a/src/util/metal_device.mm +++ b/src/util/metal_device.mm @@ -1778,6 +1778,7 @@ static void DumpShader(u32 n, const std::string_view& suffix, const std::string_ { MetalTexture* const RT = m_current_render_targets[i]; desc.colorAttachments[i].texture = RT->GetMTLTexture(); + desc.colorAttachments[i].storeAction = MTLStoreActionStore; RT->SetUseFenceCounter(m_current_fence_counter); switch (RT->GetState()) @@ -1814,6 +1815,7 @@ static void DumpShader(u32 n, const std::string_view& suffix, const std::string_ if (MetalTexture* DS = m_current_depth_target) { desc.depthAttachment.texture = m_current_depth_target->GetMTLTexture(); + desc.depthAttachment.storeAction = MTLStoreActionStore; DS->SetUseFenceCounter(m_current_fence_counter); switch (DS->GetState())