From be57ebe01581f709b0e52a29304668eaaf6f0634 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 16 Jan 2023 18:33:30 -0600 Subject: [PATCH] ddraw: Do not report D3DDEVCAPS_HWRASTERIZATION for RGB emulation device. --- dlls/ddraw/ddraw.c | 6 +++--- dlls/ddraw/tests/ddraw1.c | 4 ++++ dlls/ddraw/tests/ddraw2.c | 4 ++++ dlls/ddraw/tests/ddraw4.c | 4 ++++ dlls/ddraw/tests/ddraw7.c | 2 ++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index fd4c5bd4862..7d9d25e62c7 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -73,7 +73,7 @@ static struct enum_device_entry "WINE Direct3D7 RGB Software Emulation using WineD3D", "Wine D3D7 RGB", &IID_IDirect3DRGBDevice, - D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX, + D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX | D3DDEVCAPS_HWRASTERIZATION, }, }; @@ -3883,8 +3883,8 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA /* RGB, RAMP and MMX devices cannot report HAL hardware flags */ hal_desc.dwFlags = 0; /* RGB, REF, RAMP and MMX devices don't report hardware transform and lighting capability */ - hal_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX); - hel_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX); + hal_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX | D3DDEVCAPS_HWRASTERIZATION); + hel_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX | D3DDEVCAPS_HWRASTERIZATION); hr = callback((GUID *)&IID_IDirect3DRGBDevice, reference_description, device_name, &hal_desc, &hel_desc, context); diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 3d81c590a3a..5e10db15860 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -15215,6 +15215,10 @@ static HRESULT WINAPI test_enum_devices_caps_callback(GUID *guid, char *device_d "RGB Device hal device caps has D3DDEVCAPS_DRAWPRIMITIVES2EX set\n"); ok((hel->dwDevCaps & D3DDEVCAPS_DRAWPRIMITIVES2EX) == 0, "RGB Device hel device caps has D3DDEVCAPS_DRAWPRIMITIVES2EX set\n"); + ok((hal->dwDevCaps & D3DDEVCAPS_HWRASTERIZATION) == 0, + "RGB Device hal device caps has D3DDEVCAPS_HWRASTERIZATION set\n"); + ok((hel->dwDevCaps & D3DDEVCAPS_HWRASTERIZATION) == 0, + "RGB Device hel device caps has D3DDEVCAPS_HWRASTERIZATION set\n"); } else if(IsEqualGUID(&IID_IDirect3DHALDevice, guid)) { diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index f4079b1e5e5..84f0b82bb96 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -16161,6 +16161,10 @@ static HRESULT WINAPI test_enum_devices_caps_callback(GUID *guid, char *device_d "RGB Device hal device caps has D3DDEVCAPS_DRAWPRIMITIVES2EX set\n"); ok((hel->dwDevCaps & D3DDEVCAPS_DRAWPRIMITIVES2EX) == 0, "RGB Device hel device caps has D3DDEVCAPS_DRAWPRIMITIVES2EX set\n"); + ok((hal->dwDevCaps & D3DDEVCAPS_HWRASTERIZATION) == 0, + "RGB Device hal device caps has D3DDEVCAPS_HWRASTERIZATION set\n"); + ok((hel->dwDevCaps & D3DDEVCAPS_HWRASTERIZATION) == 0, + "RGB Device hel device caps has D3DDEVCAPS_HWRASTERIZATION set\n"); } else if(IsEqualGUID(&IID_IDirect3DHALDevice, guid)) { diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index ff38483faf9..02591afc079 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -19230,6 +19230,10 @@ static HRESULT WINAPI test_enum_devices_caps_callback(GUID *guid, char *device_d "RGB Device hal device caps has D3DDEVCAPS_DRAWPRIMITIVES2EX set\n"); ok((hel->dwDevCaps & D3DDEVCAPS_DRAWPRIMITIVES2EX) == 0, "RGB Device hel device caps has D3DDEVCAPS_DRAWPRIMITIVES2EX set\n"); + ok((hal->dwDevCaps & D3DDEVCAPS_HWRASTERIZATION) == 0, + "RGB Device hal device caps has D3DDEVCAPS_HWRASTERIZATION set\n"); + ok((hel->dwDevCaps & D3DDEVCAPS_HWRASTERIZATION) == 0, + "RGB Device hel device caps has D3DDEVCAPS_HWRASTERIZATION set\n"); } else if(IsEqualGUID(&IID_IDirect3DHALDevice, guid)) { diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 8631f824edd..75bc08b0437 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -19446,6 +19446,8 @@ static HRESULT WINAPI test_enum_devices_caps_callback(char *device_desc, char *d "RGB Device device caps has D3DDEVCAPS_HWTRANSFORMANDLIGHT set\n"); ok((device_desc7->dwDevCaps & D3DDEVCAPS_DRAWPRIMITIVES2EX) == 0, "RGB Device device caps has D3DDEVCAPS_DRAWPRIMITIVES2EX set\n"); + ok((device_desc7->dwDevCaps & D3DDEVCAPS_HWRASTERIZATION) == 0, + "RGB Device device caps has D3DDEVCAPS_HWRASTERIZATION set\n"); } else {