metal: improve performance of auto depth/stencil in setCanvas.

This commit is contained in:
Alex Szpakowski
2022-01-22 23:12:42 -04:00
parent 4c3c875aa9
commit c26f6ed94f
2 changed files with 11 additions and 4 deletions
+5
View File
@@ -907,6 +907,11 @@ void Graphics::setRenderTargets(const RenderTargets &rts)
renderTargetSwitchCount++;
resetProjection();
// Invalidate temporary depth/stencil. This could be a clear, but if the
// user also clears a double-clear may be slow...
if (rts.depthStencil.texture == nullptr && rts.temporaryRTFlags != 0)
discard({}, true);
}
void Graphics::setRenderTarget()