Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/ddraw/tests/ddraw1.c | 20 +++++++++----------- dlls/ddraw/tests/ddraw2.c | 21 ++++++++++----------- dlls/ddraw/tests/ddraw4.c | 14 ++++++-------- dlls/ddraw/tests/ddraw7.c | 14 ++++++-------- 4 files changed, 31 insertions(+), 38 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 57bc622e48b..36507749eca 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -4332,7 +4332,6 @@ static void test_rt_caps(const GUID *device_guid) IDirectDrawPalette *palette; IDirect3DDevice *device; BOOL software_device; - DWORD expected_caps; IDirectDraw *ddraw; DWORD z_depth = 0; unsigned int i; @@ -4439,7 +4438,8 @@ static void test_rt_caps(const GUID *device_guid) { &p8_fmt, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE, - {~0u /* AMD r200 */, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY}, + {DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM, + DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY}, DDERR_NOPALETTEATTACHED, FALSE, }, @@ -4475,14 +4475,15 @@ static void test_rt_caps(const GUID *device_guid) { NULL, DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER, - {~0u /* AMD Evergreen */, DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY}, + {DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM, + DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY}, DDERR_INVALIDCAPS, FALSE, }, { NULL, DDSCAPS_ZBUFFER, - {~0u /* AMD Evergreen */, DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY}, + {DDSCAPS_ZBUFFER | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM, DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY}, DDERR_INVALIDCAPS, FALSE, }, @@ -4563,18 +4564,15 @@ static void test_rt_caps(const GUID *device_guid) ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); if (software_device) { - expected_caps = test_data[i].caps_out[1] - ? test_data[i].caps_out[1] : test_data[i].caps_out[0]; - - todo_wine_if(test_data[i].caps_out[0] == ~0u && surface_desc.ddsCaps.dwCaps != expected_caps) - ok(surface_desc.ddsCaps.dwCaps == expected_caps - || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0], + ok(surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0] + || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[1], "Got unexpected caps %#x, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, i, software_device); } else { - ok(test_data[i].caps_out[0] == ~0u || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0], + ok(surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0] || (test_data[i].pf == &p8_fmt + && surface_desc.ddsCaps.dwCaps == (test_data[i].caps_in | DDSCAPS_SYSTEMMEMORY)), "Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, test_data[i].caps_out[0], i, software_device); } diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index d2889aa05d7..4a7a9cbfe1d 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -4755,7 +4755,6 @@ static void test_rt_caps(const GUID *device_guid) IDirectDrawPalette *palette; IDirect3DDevice2 *device; BOOL software_device; - DWORD expected_caps; IDirectDraw2 *ddraw; DWORD z_depth = 0; IDirect3D2 *d3d; @@ -4888,7 +4887,8 @@ static void test_rt_caps(const GUID *device_guid) { &p8_fmt, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE, - {~0u /* AMD r200 */, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY}, + {DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM, + DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY}, DDERR_NOPALETTEATTACHED, DDERR_INVALIDCAPS, DDERR_INVALIDCAPS, @@ -4934,7 +4934,8 @@ static void test_rt_caps(const GUID *device_guid) { NULL, DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER, - {~0u /* AMD Evergreen */, DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY}, + {DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM, + DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY}, DDERR_INVALIDCAPS, DDERR_INVALIDPIXELFORMAT, DDERR_INVALIDCAPS, @@ -4943,7 +4944,8 @@ static void test_rt_caps(const GUID *device_guid) { NULL, DDSCAPS_ZBUFFER, - {~0u /* AMD Evergreen */, DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY}, + {DDSCAPS_ZBUFFER | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM, + DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY}, DDERR_INVALIDCAPS, DDERR_INVALIDCAPS, DDERR_INVALIDCAPS, @@ -5035,18 +5037,15 @@ static void test_rt_caps(const GUID *device_guid) ok(hr == DD_OK, "Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device); if (software_device) { - expected_caps = test_data[i].caps_out[software_device] - ? test_data[i].caps_out[software_device] : test_data[i].caps_out[0]; - - todo_wine_if(test_data[i].caps_out[0] == ~0u && surface_desc.ddsCaps.dwCaps != expected_caps) - ok(surface_desc.ddsCaps.dwCaps == expected_caps - || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0], + ok(surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0] + || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[1], "Got unexpected caps %#x, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, i, software_device); } else { - ok(test_data[i].caps_out[0] == ~0u || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0], + ok(surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0] || (test_data[i].pf == &p8_fmt + && surface_desc.ddsCaps.dwCaps == (test_data[i].caps_in | DDSCAPS_SYSTEMMEMORY)), "Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, test_data[i].caps_out[0], i, software_device); } diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 6e003fbfb7e..745b479e487 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -6365,7 +6365,6 @@ static void test_rt_caps(const GUID *device_guid) PALETTEENTRY palette_entries[256]; IDirectDrawPalette *palette; BOOL software_device; - DWORD expected_caps; IDirectDraw4 *ddraw; DDPIXELFORMAT z_fmt; IDirect3D3 *d3d; @@ -6529,7 +6528,8 @@ static void test_rt_caps(const GUID *device_guid) { &p8_fmt, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE, - {~0u /* AMD r200 */, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY}, + {DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM, + DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY}, 0, 0, DDERR_NOPALETTEATTACHED, @@ -6686,17 +6686,15 @@ static void test_rt_caps(const GUID *device_guid)
if (software_device) { - expected_caps = test_data[i].caps_out[software_device] - ? test_data[i].caps_out[software_device] : test_data[i].caps_out[0]; - - ok(surface_desc.ddsCaps.dwCaps == expected_caps - || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0], + ok(surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0] + || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[1], "Got unexpected caps %#x, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, i, software_device); } else { - ok(test_data[i].caps_out[0] == ~0u || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0], + ok(surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0] || (test_data[i].pf == &p8_fmt + && surface_desc.ddsCaps.dwCaps == (test_data[i].caps_in | DDSCAPS_SYSTEMMEMORY)), "Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, test_data[i].caps_out[0], i, software_device); } diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 8417554b98c..da19545b422 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -6096,7 +6096,6 @@ static void test_rt_caps(const GUID *device_guid) PALETTEENTRY palette_entries[256]; IDirectDrawPalette *palette; BOOL software_device; - DWORD expected_caps; IDirectDraw7 *ddraw; DDPIXELFORMAT z_fmt; IDirect3D7 *d3d; @@ -6259,7 +6258,8 @@ static void test_rt_caps(const GUID *device_guid) { &p8_fmt, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE, - {~0u /* AMD r200 */, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY}, + {DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM, + DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY}, 0, 0, DDERR_NOPALETTEATTACHED, @@ -6416,17 +6416,15 @@ static void test_rt_caps(const GUID *device_guid)
if (software_device) { - expected_caps = test_data[i].caps_out[software_device] - ? test_data[i].caps_out[software_device] : test_data[i].caps_out[0]; - - ok(surface_desc.ddsCaps.dwCaps == expected_caps - || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0], + ok(surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0] + || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[1], "Got unexpected caps %#x, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, i, software_device); } else { - ok(test_data[i].caps_out[0] == ~0u || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0], + ok(surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0] || (test_data[i].pf == &p8_fmt + && surface_desc.ddsCaps.dwCaps == (test_data[i].caps_in | DDSCAPS_SYSTEMMEMORY)), "Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n", surface_desc.ddsCaps.dwCaps, test_data[i].caps_out[0], i, software_device); }