Commit 81ed93d4 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw/tests: Accept nvidia return values in test_rt_caps.

parent e650da35
......@@ -3663,6 +3663,7 @@ static void test_rt_caps(void)
DWORD caps_out;
HRESULT create_device_hr;
HRESULT set_rt_hr;
HRESULT alternative_set_rt_hr;
}
test_data[] =
{
......@@ -3672,6 +3673,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -3679,6 +3681,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -3686,6 +3689,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -3693,6 +3697,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
D3DERR_SURFACENOTINVIDMEM,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -3700,6 +3705,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -3707,6 +3713,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -3714,6 +3721,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -3721,6 +3729,7 @@ static void test_rt_caps(void)
DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -3728,6 +3737,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
D3DERR_SURFACENOTINVIDMEM,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -3735,6 +3745,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -3742,6 +3753,7 @@ static void test_rt_caps(void)
DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -3749,6 +3761,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
DDERR_NOPALETTEATTACHED,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -3756,6 +3769,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -3763,6 +3777,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
DDERR_NOPALETTEATTACHED,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -3770,6 +3785,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -3777,6 +3793,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDPIXELFORMAT,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -3784,6 +3801,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDPIXELFORMAT,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -3791,6 +3809,7 @@ static void test_rt_caps(void)
DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -3798,6 +3817,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
DDERR_INVALIDCAPS,
DDERR_INVALIDPIXELFORMAT,
DDERR_INVALIDPIXELFORMAT,
},
{
NULL,
......@@ -3805,6 +3825,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
};
......@@ -3919,7 +3940,8 @@ static void test_rt_caps(void)
i, test_data[i].caps_in, hr);
hr = IDirect3DDevice2_SetRenderTarget(device, rt, 0);
ok(hr == test_data[i].set_rt_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n",
ok(hr == test_data[i].set_rt_hr || broken(hr == test_data[i].alternative_set_rt_hr),
"Test %u: Got unexpected hr %#x, expected %#x.\n",
i, hr, test_data[i].set_rt_hr);
if (SUCCEEDED(hr) || hr == DDERR_INVALIDPIXELFORMAT)
expected_rt = rt;
......
......@@ -4084,7 +4084,7 @@ static void test_rt_caps(void)
DWORD caps_in;
DWORD caps_out;
HRESULT create_device_hr;
HRESULT set_rt_hr;
HRESULT set_rt_hr, alternative_set_rt_hr;
}
test_data[] =
{
......@@ -4094,6 +4094,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -4101,6 +4102,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -4108,6 +4110,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -4115,6 +4118,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
D3DERR_SURFACENOTINVIDMEM,
DDERR_INVALIDPARAMS,
D3D_OK,
},
{
NULL,
......@@ -4122,6 +4126,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -4129,6 +4134,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -4136,6 +4142,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -4143,6 +4150,7 @@ static void test_rt_caps(void)
DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -4150,6 +4158,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
D3DERR_SURFACENOTINVIDMEM,
DDERR_INVALIDPARAMS,
D3D_OK,
},
{
NULL,
......@@ -4157,6 +4166,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -4164,6 +4174,7 @@ static void test_rt_caps(void)
DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -4171,6 +4182,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
DDERR_NOPALETTEATTACHED,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -4178,6 +4190,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -4185,6 +4198,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
DDERR_NOPALETTEATTACHED,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -4192,6 +4206,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&z_fmt,
......@@ -4199,6 +4214,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDPIXELFORMAT,
DDERR_INVALIDPIXELFORMAT,
},
{
&z_fmt,
......@@ -4206,6 +4222,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDPIXELFORMAT,
DDERR_INVALIDPIXELFORMAT,
},
{
&z_fmt,
......@@ -4213,6 +4230,7 @@ static void test_rt_caps(void)
DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&z_fmt,
......@@ -4220,6 +4238,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
DDERR_INVALIDCAPS,
DDERR_INVALIDPARAMS,
DDERR_INVALIDPIXELFORMAT,
},
{
&z_fmt,
......@@ -4227,6 +4246,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
};
......@@ -4337,7 +4357,8 @@ static void test_rt_caps(void)
i, test_data[i].caps_in, hr);
hr = IDirect3DDevice7_SetRenderTarget(device, rt, 0);
ok(hr == test_data[i].set_rt_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n",
ok(hr == test_data[i].set_rt_hr || broken(hr == test_data[i].alternative_set_rt_hr),
"Test %u: Got unexpected hr %#x, expected %#x.\n",
i, hr, test_data[i].set_rt_hr);
if (SUCCEEDED(hr) || hr == DDERR_INVALIDPIXELFORMAT)
expected_rt = rt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment