Skip to content

Commit

Permalink
[d3d9] Allow fourcc formats as the source in CheckFormatConversion
Browse files Browse the repository at this point in the history
The docs say:
"The source format must be a FOURCC format or a valid back buffer format."
  • Loading branch information
K0bin authored and Joshua-Ashton committed Jul 19, 2024
1 parent b7d61b7 commit 031a98c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/d3d9/d3d9_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/d3d9/d3d9_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 031a98c

Please sign in to comment.