From 79feed9d89982195dd709e86df5ba7c5bb9a38e0 Mon Sep 17 00:00:00 2001 From: Christopher Egert Date: Mon, 18 May 2020 22:38:24 +0200 Subject: [PATCH] [d3d9] Allow D3DFMT_NULL as RenderTargetFormat in CheckDepthStencilMatch This partially fixes shadows in Timeshift. --- src/d3d9/d3d9_adapter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d3d9/d3d9_adapter.cpp b/src/d3d9/d3d9_adapter.cpp index 4c7821d4..24aeac6b 100644 --- a/src/d3d9/d3d9_adapter.cpp +++ b/src/d3d9/d3d9_adapter.cpp @@ -217,6 +217,9 @@ namespace dxvk { if (!IsDepthFormat(DepthStencilFormat)) return D3DERR_NOTAVAILABLE; + if (RenderTargetFormat == dxvk::D3D9Format::NULL_FORMAT) + return D3D_OK; + auto mapping = ConvertFormatUnfixed(RenderTargetFormat); if (mapping.FormatColor == VK_FORMAT_UNDEFINED) return D3DERR_NOTAVAILABLE;