ddraw/tests: Compute output caps instead of coding them in test_rt_caps().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fb6b5ce72e
commit
b5a531d9b0
|
@ -4332,9 +4332,9 @@ 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;
|
||||
DDCAPS hal_caps;
|
||||
unsigned int i;
|
||||
ULONG refcount;
|
||||
HWND window;
|
||||
|
@ -4350,7 +4350,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
const DDPIXELFORMAT *pf;
|
||||
DWORD caps_in;
|
||||
DWORD caps_out[2];
|
||||
HRESULT create_device_hr;
|
||||
BOOL create_may_fail;
|
||||
}
|
||||
|
@ -4359,144 +4358,120 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
D3D_OK,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
D3D_OK,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
D3D_OK,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
D3D_OK,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
0,
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM, DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
&p8_fmt,
|
||||
0,
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
DDERR_INVALIDCAPS,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE,
|
||||
{~0u /* AMD r200 */, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_NOPALETTEATTACHED,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
DDERR_NOPALETTEATTACHED,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM},
|
||||
DDERR_INVALIDCAPS,
|
||||
TRUE /* AMD Evergreen */,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
|
||||
{~0u /* AMD Evergreen */, DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_ZBUFFER,
|
||||
{~0u /* AMD Evergreen */, DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
FALSE,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER},
|
||||
DDERR_INVALIDCAPS,
|
||||
TRUE /* Nvidia Kepler */,
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER},
|
||||
DDERR_INVALIDCAPS,
|
||||
TRUE /* Nvidia Kepler */,
|
||||
},
|
||||
|
@ -4522,38 +4497,45 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL);
|
||||
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
memset(&hal_caps, 0, sizeof(hal_caps));
|
||||
hal_caps.dwSize = sizeof(hal_caps);
|
||||
hr = IDirectDraw_GetCaps(ddraw, &hal_caps, NULL);
|
||||
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(test_data); ++i)
|
||||
{
|
||||
DWORD caps_in, expected_caps;
|
||||
IDirectDrawSurface *surface;
|
||||
DDSURFACEDESC surface_desc;
|
||||
IDirect3DDevice *device;
|
||||
HRESULT expected_hr;
|
||||
|
||||
caps_in = test_data[i].caps_in;
|
||||
|
||||
memset(&surface_desc, 0, sizeof(surface_desc));
|
||||
surface_desc.dwSize = sizeof(surface_desc);
|
||||
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
|
||||
surface_desc.ddsCaps.dwCaps = test_data[i].caps_in;
|
||||
surface_desc.ddsCaps.dwCaps = caps_in;
|
||||
if (test_data[i].pf)
|
||||
{
|
||||
surface_desc.dwFlags |= DDSD_PIXELFORMAT;
|
||||
surface_desc.ddpfPixelFormat = *test_data[i].pf;
|
||||
}
|
||||
if (test_data[i].caps_in & DDSCAPS_ZBUFFER)
|
||||
if (caps_in & DDSCAPS_ZBUFFER)
|
||||
{
|
||||
surface_desc.dwFlags |= DDSD_ZBUFFERBITDEPTH;
|
||||
U2(surface_desc).dwZBufferBitDepth = z_depth;
|
||||
}
|
||||
surface_desc.dwWidth = 640;
|
||||
surface_desc.dwHeight = 480;
|
||||
if ((caps_in & DDSCAPS_VIDEOMEMORY) && !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
|
||||
expected_hr = DDERR_NODIRECTDRAWHW;
|
||||
else
|
||||
expected_hr = DD_OK;
|
||||
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL);
|
||||
if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY && hr == DDERR_NODIRECTDRAWHW)
|
||||
{
|
||||
skip("No 3d hardware, skipping test %u, software_device %u.\n", i, software_device);
|
||||
continue;
|
||||
}
|
||||
ok(hr == DD_OK || broken(test_data[i].create_may_fail
|
||||
ok(hr == expected_hr || broken(test_data[i].create_may_fail
|
||||
|| (software_device && test_data[i].pf == &p8_fmt && hr == DDERR_INVALIDPIXELFORMAT)),
|
||||
"Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device);
|
||||
|
||||
if (FAILED(hr))
|
||||
continue;
|
||||
|
||||
|
@ -4561,23 +4543,18 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
surface_desc.dwSize = sizeof(surface_desc);
|
||||
hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc);
|
||||
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],
|
||||
"Got unexpected caps %#x, test %u, software_device %u.\n",
|
||||
surface_desc.ddsCaps.dwCaps, i, software_device);
|
||||
}
|
||||
if ((caps_in & DDSCAPS_SYSTEMMEMORY) || !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
|
||||
expected_caps = caps_in | DDSCAPS_SYSTEMMEMORY;
|
||||
else
|
||||
{
|
||||
ok(test_data[i].caps_out[0] == ~0u || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0],
|
||||
"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);
|
||||
}
|
||||
expected_caps = caps_in | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM;
|
||||
|
||||
ok(surface_desc.ddsCaps.dwCaps == expected_caps || (test_data[i].pf == &p8_fmt
|
||||
&& surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY))
|
||||
|| (software_device && caps_in & DDSCAPS_ZBUFFER
|
||||
&& surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)),
|
||||
"Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n",
|
||||
surface_desc.ddsCaps.dwCaps, expected_caps, i, software_device);
|
||||
|
||||
hr = IDirectDrawSurface_QueryInterface(surface, device_guid, (void **)&device);
|
||||
todo_wine_if(software_device && test_data[i].create_device_hr == D3DERR_SURFACENOTINVIDMEM)
|
||||
|
|
|
@ -4755,10 +4755,10 @@ 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;
|
||||
DDCAPS hal_caps;
|
||||
unsigned int i;
|
||||
ULONG refcount;
|
||||
HWND window;
|
||||
|
@ -4774,7 +4774,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
const DDPIXELFORMAT *pf;
|
||||
DWORD caps_in;
|
||||
DWORD caps_out[2];
|
||||
HRESULT create_device_hr;
|
||||
HRESULT set_rt_hr;
|
||||
HRESULT alternative_set_rt_hr;
|
||||
|
@ -4785,7 +4784,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -4794,8 +4792,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -4804,8 +4800,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4814,7 +4808,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -4823,7 +4816,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4832,7 +4824,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -4841,8 +4832,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -4851,8 +4840,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
0,
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4861,7 +4848,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -4870,7 +4856,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4879,7 +4864,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
0,
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4888,7 +4872,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE,
|
||||
{~0u /* AMD r200 */, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_NOPALETTEATTACHED,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4897,8 +4880,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4907,7 +4888,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
DDERR_NOPALETTEATTACHED,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4916,7 +4896,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4925,7 +4904,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDPIXELFORMAT,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4934,7 +4912,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
|
||||
{~0u /* AMD Evergreen */, DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDPIXELFORMAT,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4943,7 +4920,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_ZBUFFER,
|
||||
{~0u /* AMD Evergreen */, DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4952,7 +4928,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDPIXELFORMAT,
|
||||
DDERR_INVALIDPIXELFORMAT,
|
||||
|
@ -4961,7 +4936,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER},
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -4995,35 +4969,43 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
hr = IDirectDraw2_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL);
|
||||
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
memset(&hal_caps, 0, sizeof(hal_caps));
|
||||
hal_caps.dwSize = sizeof(hal_caps);
|
||||
hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, NULL);
|
||||
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(test_data); ++i)
|
||||
{
|
||||
IDirectDrawSurface *surface, *rt, *expected_rt, *tmp;
|
||||
DWORD caps_in, expected_caps;
|
||||
DDSURFACEDESC surface_desc;
|
||||
IDirect3DDevice2 *device;
|
||||
HRESULT expected_hr;
|
||||
|
||||
caps_in = test_data[i].caps_in;
|
||||
|
||||
memset(&surface_desc, 0, sizeof(surface_desc));
|
||||
surface_desc.dwSize = sizeof(surface_desc);
|
||||
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
|
||||
surface_desc.ddsCaps.dwCaps = test_data[i].caps_in;
|
||||
surface_desc.ddsCaps.dwCaps = caps_in;
|
||||
if (test_data[i].pf)
|
||||
{
|
||||
surface_desc.dwFlags |= DDSD_PIXELFORMAT;
|
||||
surface_desc.ddpfPixelFormat = *test_data[i].pf;
|
||||
}
|
||||
if (test_data[i].caps_in & DDSCAPS_ZBUFFER)
|
||||
if (caps_in & DDSCAPS_ZBUFFER)
|
||||
{
|
||||
surface_desc.dwFlags |= DDSD_ZBUFFERBITDEPTH;
|
||||
U2(surface_desc).dwZBufferBitDepth = z_depth;
|
||||
}
|
||||
surface_desc.dwWidth = 640;
|
||||
surface_desc.dwHeight = 480;
|
||||
if ((caps_in & DDSCAPS_VIDEOMEMORY) && !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
|
||||
expected_hr = DDERR_NODIRECTDRAWHW;
|
||||
else
|
||||
expected_hr = DD_OK;
|
||||
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL);
|
||||
if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY && hr == DDERR_NODIRECTDRAWHW)
|
||||
{
|
||||
skip("No 3d hardware, skipping test %u, software_device %u.\n", i, software_device);
|
||||
continue;
|
||||
}
|
||||
ok(hr == DD_OK || broken(test_data[i].create_may_fail
|
||||
ok(hr == expected_hr || broken(test_data[i].create_may_fail
|
||||
|| (software_device && test_data[i].pf == &p8_fmt && hr == DDERR_INVALIDPIXELFORMAT)),
|
||||
"Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device);
|
||||
if (FAILED(hr))
|
||||
|
@ -5032,24 +5014,18 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
memset(&surface_desc, 0, sizeof(surface_desc));
|
||||
surface_desc.dwSize = sizeof(surface_desc);
|
||||
hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc);
|
||||
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],
|
||||
"Got unexpected caps %#x, test %u, software_device %u.\n",
|
||||
surface_desc.ddsCaps.dwCaps, i, software_device);
|
||||
}
|
||||
if ((caps_in & DDSCAPS_SYSTEMMEMORY) || !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
|
||||
expected_caps = caps_in | DDSCAPS_SYSTEMMEMORY;
|
||||
else
|
||||
{
|
||||
ok(test_data[i].caps_out[0] == ~0u || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0],
|
||||
"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);
|
||||
}
|
||||
expected_caps = caps_in | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM;
|
||||
|
||||
ok(surface_desc.ddsCaps.dwCaps == expected_caps || (test_data[i].pf == &p8_fmt
|
||||
&& surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY))
|
||||
|| (software_device && caps_in & DDSCAPS_ZBUFFER
|
||||
&& surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)),
|
||||
"Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n",
|
||||
surface_desc.ddsCaps.dwCaps, expected_caps, i, software_device);
|
||||
|
||||
hr = IDirect3D2_CreateDevice(d3d, device_guid, surface, &device);
|
||||
|
||||
|
|
|
@ -6365,10 +6365,10 @@ 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;
|
||||
DDCAPS hal_caps;
|
||||
unsigned int i;
|
||||
ULONG refcount;
|
||||
HWND window;
|
||||
|
@ -6384,9 +6384,7 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
const DDPIXELFORMAT *pf;
|
||||
DWORD caps_in;
|
||||
DWORD caps_out[2];
|
||||
DWORD caps2_in;
|
||||
DWORD caps2_out;
|
||||
HRESULT create_device_hr;
|
||||
HRESULT set_rt_hr, alternative_set_rt_hr;
|
||||
}
|
||||
|
@ -6395,8 +6393,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
0,
|
||||
0,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -6405,9 +6401,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -6416,9 +6409,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6427,8 +6417,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
0,
|
||||
0,
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
D3D_OK,
|
||||
|
@ -6437,8 +6425,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6447,8 +6433,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
0,
|
||||
0,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -6457,9 +6441,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -6468,9 +6449,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
0,
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6479,8 +6457,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
0,
|
||||
0,
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
D3D_OK,
|
||||
|
@ -6489,8 +6465,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6499,8 +6473,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
DDSCAPS2_TEXTUREMANAGE,
|
||||
DDSCAPS2_TEXTUREMANAGE,
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
D3D_OK,
|
||||
|
@ -6509,8 +6481,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
DDSCAPS2_D3DTEXTUREMANAGE,
|
||||
DDSCAPS2_D3DTEXTUREMANAGE,
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
D3D_OK,
|
||||
|
@ -6519,8 +6489,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
0,
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6529,8 +6497,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE,
|
||||
{~0u /* AMD r200 */, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_NOPALETTEATTACHED,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6539,9 +6505,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6550,8 +6513,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
0,
|
||||
0,
|
||||
DDERR_NOPALETTEATTACHED,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6560,8 +6521,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6570,8 +6529,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&z_fmt,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDPIXELFORMAT,
|
||||
|
@ -6580,9 +6537,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&z_fmt,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDPIXELFORMAT,
|
||||
|
@ -6591,9 +6545,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&z_fmt,
|
||||
DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6602,8 +6553,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&z_fmt,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDPIXELFORMAT,
|
||||
|
@ -6612,8 +6561,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&z_fmt,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6648,16 +6595,25 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
hr = IDirectDraw4_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL);
|
||||
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
memset(&hal_caps, 0, sizeof(hal_caps));
|
||||
hal_caps.dwSize = sizeof(hal_caps);
|
||||
hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, NULL);
|
||||
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(test_data); ++i)
|
||||
{
|
||||
IDirectDrawSurface4 *surface, *rt, *expected_rt, *tmp;
|
||||
DWORD caps_in, expected_caps;
|
||||
DDSURFACEDESC2 surface_desc;
|
||||
IDirect3DDevice3 *device;
|
||||
HRESULT expected_hr;
|
||||
|
||||
caps_in = test_data[i].caps_in;
|
||||
|
||||
memset(&surface_desc, 0, sizeof(surface_desc));
|
||||
surface_desc.dwSize = sizeof(surface_desc);
|
||||
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
|
||||
surface_desc.ddsCaps.dwCaps = test_data[i].caps_in;
|
||||
surface_desc.ddsCaps.dwCaps = caps_in;
|
||||
surface_desc.ddsCaps.dwCaps2 = test_data[i].caps2_in;
|
||||
if (test_data[i].pf)
|
||||
{
|
||||
|
@ -6666,13 +6622,12 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
}
|
||||
surface_desc.dwWidth = 640;
|
||||
surface_desc.dwHeight = 480;
|
||||
if ((caps_in & DDSCAPS_VIDEOMEMORY) && !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
|
||||
expected_hr = DDERR_NODIRECTDRAWHW;
|
||||
else
|
||||
expected_hr = DD_OK;
|
||||
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL);
|
||||
if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY && hr == DDERR_NODIRECTDRAWHW)
|
||||
{
|
||||
skip("No 3d hardware, skipping test %u, software_device %u.\n", i, software_device);
|
||||
continue;
|
||||
}
|
||||
ok(hr == DD_OK || (software_device && (surface_desc.ddsCaps.dwCaps & (DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER))
|
||||
ok(hr == expected_hr || (software_device && (surface_desc.ddsCaps.dwCaps & (DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER))
|
||||
== (DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER) && hr == DDERR_UNSUPPORTED)
|
||||
|| broken(software_device && test_data[i].pf == &p8_fmt && hr == DDERR_INVALIDPIXELFORMAT),
|
||||
"Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device);
|
||||
|
@ -6684,25 +6639,22 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc);
|
||||
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];
|
||||
|
||||
ok(surface_desc.ddsCaps.dwCaps == expected_caps
|
||||
|| surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0],
|
||||
"Got unexpected caps %#x, test %u, software_device %u.\n",
|
||||
surface_desc.ddsCaps.dwCaps, i, software_device);
|
||||
}
|
||||
if ((caps_in & DDSCAPS_SYSTEMMEMORY) || (test_data[i].caps2_in & (DDSCAPS2_D3DTEXTUREMANAGE
|
||||
| DDSCAPS2_TEXTUREMANAGE)) || !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
|
||||
expected_caps = caps_in | DDSCAPS_SYSTEMMEMORY;
|
||||
else
|
||||
{
|
||||
ok(test_data[i].caps_out[0] == ~0u || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0],
|
||||
"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);
|
||||
}
|
||||
ok(surface_desc.ddsCaps.dwCaps2 == test_data[i].caps2_out,
|
||||
expected_caps = caps_in | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM;
|
||||
|
||||
ok(surface_desc.ddsCaps.dwCaps == expected_caps || (test_data[i].pf == &p8_fmt
|
||||
&& surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY))
|
||||
|| (software_device && test_data[i].pf == &z_fmt
|
||||
&& surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)),
|
||||
"Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n",
|
||||
surface_desc.ddsCaps.dwCaps, expected_caps, i, software_device);
|
||||
|
||||
ok(surface_desc.ddsCaps.dwCaps2 == test_data[i].caps2_in,
|
||||
"Got unexpected caps2 %#x, expected %#x, test %u, software_device %u.\n",
|
||||
surface_desc.ddsCaps.dwCaps2, test_data[i].caps2_out, i, software_device);
|
||||
surface_desc.ddsCaps.dwCaps2, test_data[i].caps2_in, i, software_device);
|
||||
|
||||
hr = IDirect3D3_CreateDevice(d3d, device_guid, surface, &device, NULL);
|
||||
|
||||
|
|
|
@ -6096,10 +6096,10 @@ 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;
|
||||
DDCAPS hal_caps;
|
||||
unsigned int i;
|
||||
ULONG refcount;
|
||||
HWND window;
|
||||
|
@ -6115,9 +6115,7 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
const DDPIXELFORMAT *pf;
|
||||
DWORD caps_in;
|
||||
DWORD caps_out[2];
|
||||
DWORD caps2_in;
|
||||
DWORD caps2_out;
|
||||
HRESULT create_device_hr;
|
||||
HRESULT set_rt_hr, alternative_set_rt_hr;
|
||||
}
|
||||
|
@ -6126,8 +6124,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
0,
|
||||
0,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -6136,9 +6132,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -6147,9 +6140,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6158,8 +6148,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
0,
|
||||
0,
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
DDERR_INVALIDPARAMS,
|
||||
|
@ -6168,8 +6156,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6178,8 +6164,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
0,
|
||||
0,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -6188,9 +6172,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
D3D_OK,
|
||||
D3D_OK,
|
||||
|
@ -6199,8 +6180,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
0,
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM, DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6209,8 +6188,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
0,
|
||||
0,
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
DDERR_INVALIDPARAMS,
|
||||
|
@ -6219,8 +6196,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6229,8 +6204,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
DDSCAPS2_TEXTUREMANAGE,
|
||||
DDSCAPS2_TEXTUREMANAGE,
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
DDERR_INVALIDPARAMS,
|
||||
|
@ -6239,8 +6212,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
NULL,
|
||||
DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
DDSCAPS2_D3DTEXTUREMANAGE,
|
||||
DDSCAPS2_D3DTEXTUREMANAGE,
|
||||
D3DERR_SURFACENOTINVIDMEM,
|
||||
DDERR_INVALIDPARAMS,
|
||||
|
@ -6249,8 +6220,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
0,
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6259,8 +6228,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE,
|
||||
{~0u /* AMD r200 */, DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_NOPALETTEATTACHED,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6269,9 +6236,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6280,8 +6244,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE},
|
||||
0,
|
||||
0,
|
||||
DDERR_NOPALETTEATTACHED,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6290,8 +6252,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&p8_fmt,
|
||||
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
|
||||
{DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6300,8 +6260,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&z_fmt,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDPIXELFORMAT,
|
||||
|
@ -6310,9 +6268,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&z_fmt,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDPIXELFORMAT,
|
||||
|
@ -6321,9 +6276,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&z_fmt,
|
||||
DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6332,8 +6284,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&z_fmt,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDPARAMS,
|
||||
|
@ -6342,8 +6292,6 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
{
|
||||
&z_fmt,
|
||||
DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER,
|
||||
{DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER},
|
||||
0,
|
||||
0,
|
||||
DDERR_INVALIDCAPS,
|
||||
DDERR_INVALIDCAPS,
|
||||
|
@ -6378,16 +6326,25 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
hr = IDirectDraw7_CreatePalette(ddraw, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, palette_entries, &palette, NULL);
|
||||
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
memset(&hal_caps, 0, sizeof(hal_caps));
|
||||
hal_caps.dwSize = sizeof(hal_caps);
|
||||
hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, NULL);
|
||||
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(test_data); ++i)
|
||||
{
|
||||
IDirectDrawSurface7 *surface, *rt, *expected_rt, *tmp;
|
||||
DDSURFACEDESC2 surface_desc;
|
||||
DWORD caps_in, expected_caps;
|
||||
IDirect3DDevice7 *device;
|
||||
HRESULT expected_hr;
|
||||
|
||||
caps_in = test_data[i].caps_in;
|
||||
|
||||
memset(&surface_desc, 0, sizeof(surface_desc));
|
||||
surface_desc.dwSize = sizeof(surface_desc);
|
||||
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
|
||||
surface_desc.ddsCaps.dwCaps = test_data[i].caps_in;
|
||||
surface_desc.ddsCaps.dwCaps = caps_in;
|
||||
surface_desc.ddsCaps.dwCaps2 = test_data[i].caps2_in;
|
||||
if (test_data[i].pf)
|
||||
{
|
||||
|
@ -6396,13 +6353,12 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
}
|
||||
surface_desc.dwWidth = 640;
|
||||
surface_desc.dwHeight = 480;
|
||||
if ((caps_in & DDSCAPS_VIDEOMEMORY) && !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
|
||||
expected_hr = DDERR_NODIRECTDRAWHW;
|
||||
else
|
||||
expected_hr = DD_OK;
|
||||
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL);
|
||||
if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY && hr == DDERR_NODIRECTDRAWHW)
|
||||
{
|
||||
skip("No 3d hardware, skipping test %u, software_device %u.\n", i, software_device);
|
||||
continue;
|
||||
}
|
||||
ok(hr == DD_OK || (software_device && (surface_desc.ddsCaps.dwCaps & (DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER))
|
||||
ok(hr == expected_hr || (software_device && (surface_desc.ddsCaps.dwCaps & (DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER))
|
||||
== (DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER) && hr == DDERR_UNSUPPORTED)
|
||||
|| broken(software_device && test_data[i].pf == &p8_fmt && hr == DDERR_INVALIDPIXELFORMAT),
|
||||
"Got unexpected hr %#x, test %u, software_device %u.\n", hr, i, software_device);
|
||||
|
@ -6414,27 +6370,22 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc);
|
||||
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[software_device]
|
||||
&& surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0])
|
||||
ok(surface_desc.ddsCaps.dwCaps == expected_caps
|
||||
|| broken(surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0]),
|
||||
"Got unexpected caps %#x, test %u, software_device %u.\n",
|
||||
surface_desc.ddsCaps.dwCaps, i, software_device);
|
||||
}
|
||||
if ((caps_in & DDSCAPS_SYSTEMMEMORY) || (test_data[i].caps2_in & (DDSCAPS2_D3DTEXTUREMANAGE
|
||||
| DDSCAPS2_TEXTUREMANAGE)) || !(hal_caps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
|
||||
expected_caps = caps_in | DDSCAPS_SYSTEMMEMORY;
|
||||
else
|
||||
{
|
||||
ok(test_data[i].caps_out[0] == ~0u || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out[0],
|
||||
"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);
|
||||
}
|
||||
ok(surface_desc.ddsCaps.dwCaps2 == test_data[i].caps2_out,
|
||||
expected_caps = caps_in | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM;
|
||||
|
||||
ok(surface_desc.ddsCaps.dwCaps == expected_caps || (test_data[i].pf == &p8_fmt
|
||||
&& surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY))
|
||||
|| (software_device && test_data[i].pf == &z_fmt
|
||||
&& surface_desc.ddsCaps.dwCaps == (caps_in | DDSCAPS_SYSTEMMEMORY)),
|
||||
"Got unexpected caps %#x, expected %#x, test %u, software_device %u.\n",
|
||||
surface_desc.ddsCaps.dwCaps, expected_caps, i, software_device);
|
||||
|
||||
ok(surface_desc.ddsCaps.dwCaps2 == test_data[i].caps2_in,
|
||||
"Got unexpected caps2 %#x, expected %#x, test %u, software_device %u.\n",
|
||||
surface_desc.ddsCaps.dwCaps2, test_data[i].caps2_out, i, software_device);
|
||||
surface_desc.ddsCaps.dwCaps2, test_data[i].caps2_in, i, software_device);
|
||||
|
||||
hr = IDirect3D7_CreateDevice(d3d, device_guid, surface, &device);
|
||||
todo_wine_if(software_device && test_data[i].create_device_hr == D3DERR_SURFACENOTINVIDMEM)
|
||||
|
@ -6492,7 +6443,7 @@ static void test_rt_caps(const GUID *device_guid)
|
|||
|
||||
hr = IDirect3DDevice7_SetRenderTarget(device, rt, 0);
|
||||
ok(hr == test_data[i].set_rt_hr || (software_device && hr == DDERR_NOPALETTEATTACHED)
|
||||
|| broken(hr == test_data[i].alternative_set_rt_hr),
|
||||
|| hr == test_data[i].alternative_set_rt_hr,
|
||||
"Got unexpected hr %#x, test %u, software_device %u.\n",
|
||||
hr, i, software_device);
|
||||
if (SUCCEEDED(hr) || hr == DDERR_INVALIDPIXELFORMAT)
|
||||
|
|
Loading…
Reference in New Issue