[d3d9] Allow arbitrary backbuffer/adapter formats

It seems these aren't linked in the way the docs made out, this fixes a crash when starting some titles.

Closes #1508
This commit is contained in:
Joshua Ashton 2020-03-18 06:00:28 +00:00
parent a9040c5cce
commit 6a8933cf31
3 changed files with 4 additions and 20 deletions

View File

@ -90,8 +90,10 @@ namespace dxvk {
D3D9Format AdapterFormat,
D3D9Format BackBufferFormat,
BOOL bWindowed) {
if (!IsSupportedBackBufferFormat(
AdapterFormat, BackBufferFormat, bWindowed))
if (!IsSupportedAdapterFormat(AdapterFormat, bWindowed))
return D3DERR_NOTAVAILABLE;
if (!IsSupportedBackBufferFormat(BackBufferFormat, bWindowed))
return D3DERR_NOTAVAILABLE;
return D3D_OK;

View File

@ -35,19 +35,6 @@ namespace dxvk {
}
bool IsSupportedBackBufferFormat(
D3D9Format AdapterFormat,
D3D9Format BackBufferFormat,
BOOL Windowed) {
if (!IsSupportedAdapterFormat(AdapterFormat, Windowed))
return false;
return AdapterFormat == BackBufferFormat
|| (AdapterFormat == D3D9Format::X8R8G8B8 && BackBufferFormat == D3D9Format::A8R8G8B8)
|| (AdapterFormat == D3D9Format::X1R5G5B5 && BackBufferFormat == D3D9Format::A1R5G5B5);
}
bool IsSupportedBackBufferFormat(
D3D9Format BackBufferFormat,
BOOL Windowed) {

View File

@ -26,11 +26,6 @@ namespace dxvk {
D3D9Format Format,
BOOL Windowed);
bool IsSupportedBackBufferFormat(
D3D9Format AdapterFormat,
D3D9Format BackBufferFormat,
BOOL Windowed);
bool IsSupportedBackBufferFormat(
D3D9Format BackBufferFormat,
BOOL Windowed);