From 274248654090aa23f96d2b073c5674261931a29b Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 21 Mar 2024 15:32:48 +0100 Subject: [PATCH] [dxvk] Don't query color space support for null surfaces Fixes a crash in games with the dxgi.deferSurfaceCreation workaround set. Note that this potentially breaks HDR. --- src/dxvk/dxvk_presenter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dxvk/dxvk_presenter.cpp b/src/dxvk/dxvk_presenter.cpp index 10f13da27..07749b38e 100644 --- a/src/dxvk/dxvk_presenter.cpp +++ b/src/dxvk/dxvk_presenter.cpp @@ -382,6 +382,9 @@ namespace dxvk { bool Presenter::supportsColorSpace(VkColorSpaceKHR colorspace) { + if (!m_surface) + return false; + std::vector surfaceFormats; getSupportedFormats(surfaceFormats, VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT);