From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/ddraw/ddraw.c | 5 +++++ dlls/ddraw/tests/d3d.c | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 64eb7235ebf..e52943efa17 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -3882,6 +3882,9 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA hal_desc.dcmColorModel = 0; /* RGB, RAMP and MMX devices cannot report HAL hardware flags */ hal_desc.dwFlags = 0; + /* RGB, REF, RAMP and MMX devices cannot report hardware transform and lighting capability */ + hal_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX); + hel_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX);
hr = callback((GUID *)&IID_IDirect3DRGBDevice, reference_description, device_name, &hal_desc, &hel_desc, context); @@ -3906,6 +3909,8 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA | D3DPTEXTURECAPS_NONPOW2CONDITIONAL | D3DPTEXTURECAPS_PERSPECTIVE); /* HAL devices have a HEL dcmColorModel of 0 */ hel_desc.dcmColorModel = 0; + /* HAL devices reports hardware transform and lighting capability, but not in hel */ + hel_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX);
hr = callback((GUID *)&IID_IDirect3DHALDevice, wined3d_description, device_name, &hal_desc, &hel_desc, context); diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 5d44a109b9f..dffb985ce19 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -518,16 +518,12 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription, ok(hal->dwFlags == 0, "RGB Device %u hal caps has hardware flags %#lx\n", ver, hal->dwFlags); ok(hel->dwFlags != 0, "RGB Device %u hel caps has hardware flags %#lx\n", ver, hel->dwFlags);
- todo_wine ok((hal->dwDevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) == 0, "RGB Device %d hal device caps has D3DDEVCAPS_HWTRANSFORMANDLIGHT set\n", ver); - todo_wine ok((hel->dwDevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) == 0, "RGB Device %d hel device caps has D3DDEVCAPS_HWTRANSFORMANDLIGHT set\n", ver); - todo_wine ok((hal->dwDevCaps & D3DDEVCAPS_DRAWPRIMITIVES2EX) == 0, "RGB Device %d hal device caps has D3DDEVCAPS_DRAWPRIMITIVES2EX set\n", ver); - todo_wine ok((hel->dwDevCaps & D3DDEVCAPS_DRAWPRIMITIVES2EX) == 0, "RGB Device %d hel device caps has D3DDEVCAPS_DRAWPRIMITIVES2EX set\n", ver); } @@ -542,12 +538,10 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription,
ok(hal->dwDevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT, "HAL Device %d hal device caps does not have D3DDEVCAPS_HWTRANSFORMANDLIGHT set\n", ver); - todo_wine ok((hel->dwDevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) == 0, "RGB Device %d hel device caps has D3DDEVCAPS_HWTRANSFORMANDLIGHT set\n", ver); ok(hal->dwDevCaps & D3DDEVCAPS_DRAWPRIMITIVES2EX, "HAL Device %d hal device caps does not have D3DDEVCAPS_DRAWPRIMITIVES2EX set\n", ver); - todo_wine ok((hel->dwDevCaps & D3DDEVCAPS_DRAWPRIMITIVES2EX) == 0, "RGB Device %d hel device caps has D3DDEVCAPS_DRAWPRIMITIVES2EX set\n", ver); }