From ed88b472a837e76ae1ddeecada6aac289e2893e8 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 13 Jan 2025 00:16:40 +0100 Subject: [PATCH] [d3d9] Set color space for swap chain image --- src/d3d9/d3d9_swapchain.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/d3d9/d3d9_swapchain.cpp b/src/d3d9/d3d9_swapchain.cpp index e0a0218ab..1b3f8318b 100644 --- a/src/d3d9/d3d9_swapchain.cpp +++ b/src/d3d9/d3d9_swapchain.cpp @@ -866,6 +866,14 @@ namespace dxvk { cHud = m_hud, cFrameId = m_wctx->frameId ] (DxvkContext* ctx) { + // Update back buffer color space as necessary + if (cSrcView->image()->info().colorSpace != cColorSpace) { + DxvkImageUsageInfo usage = { }; + usage.colorSpace = cColorSpace; + + ctx->ensureImageCompatibility(cSrcView->image(), usage); + } + // Blit back buffer onto Vulkan swap chain auto contextObjects = ctx->beginExternalRendering();