From 031a98c232cc4e6fc7aa962a654274e6585daabf Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Fri, 19 Jul 2024 18:09:43 +0200 Subject: [PATCH] [d3d9] Allow fourcc formats as the source in CheckFormatConversion The docs say: "The source format must be a FOURCC format or a valid back buffer format." --- src/d3d9/d3d9_adapter.cpp | 3 ++- src/d3d9/d3d9_format.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/d3d9/d3d9_adapter.cpp b/src/d3d9/d3d9_adapter.cpp index d0a91aac2..faf9a0381 100644 --- a/src/d3d9/d3d9_adapter.cpp +++ b/src/d3d9/d3d9_adapter.cpp @@ -251,7 +251,8 @@ namespace dxvk { D3D9Format SourceFormat, D3D9Format TargetFormat) { bool sourceSupported = SourceFormat != D3D9Format::Unknown - && IsSupportedBackBufferFormat(SourceFormat); + && (IsSupportedBackBufferFormat(SourceFormat) + || (IsFourCCFormat(SourceFormat) && !IsVendorFormat(SourceFormat))); bool targetSupported = TargetFormat == D3D9Format::X1R5G5B5 || TargetFormat == D3D9Format::A1R5G5B5 || TargetFormat == D3D9Format::R5G6B5 diff --git a/src/d3d9/d3d9_format.h b/src/d3d9/d3d9_format.h index a8927a9c1..4efbd07df 100644 --- a/src/d3d9/d3d9_format.h +++ b/src/d3d9/d3d9_format.h @@ -230,6 +230,7 @@ namespace dxvk { && format != D3D9Format::MULTI2_ARGB8 && format != D3D9Format::UYVY && format != D3D9Format::R8G8_B8G8 + && format != D3D9Format::YUY2 && format != D3D9Format::G8R8_G8B8 && format != D3D9Format::DXT1 && format != D3D9Format::DXT2