Commit 7899850d authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw/tests: r200 accepts 3DDEVICE | ZBUFFER render targets in ddraw4.

It doesn't in ddraw2 and 7.
parent 4b39c46f
......@@ -4269,7 +4269,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[] =
{
......@@ -4279,6 +4279,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -4286,6 +4287,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -4293,6 +4295,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -4300,6 +4303,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
D3DERR_SURFACENOTINVIDMEM,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -4307,6 +4311,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -4314,6 +4319,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -4321,6 +4327,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
D3D_OK,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -4328,6 +4335,7 @@ static void test_rt_caps(void)
DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
NULL,
......@@ -4335,6 +4343,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
D3DERR_SURFACENOTINVIDMEM,
D3D_OK,
D3D_OK,
},
{
NULL,
......@@ -4342,6 +4351,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -4349,6 +4359,7 @@ static void test_rt_caps(void)
DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -4356,6 +4367,7 @@ static void test_rt_caps(void)
~0U /* AMD r200 */,
DDERR_NOPALETTEATTACHED,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -4363,6 +4375,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -4370,6 +4383,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
DDERR_NOPALETTEATTACHED,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&p8_fmt,
......@@ -4377,6 +4391,7 @@ static void test_rt_caps(void)
DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&z_fmt,
......@@ -4384,6 +4399,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDPIXELFORMAT,
D3D_OK /* r200 */,
},
{
&z_fmt,
......@@ -4391,6 +4407,7 @@ static void test_rt_caps(void)
DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDPIXELFORMAT,
D3D_OK /* r200 */,
},
{
&z_fmt,
......@@ -4398,6 +4415,7 @@ static void test_rt_caps(void)
DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
{
&z_fmt,
......@@ -4405,6 +4423,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
DDERR_INVALIDCAPS,
DDERR_INVALIDPIXELFORMAT,
D3D_OK /* r200 */,
},
{
&z_fmt,
......@@ -4412,6 +4431,7 @@ static void test_rt_caps(void)
DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
DDERR_INVALIDCAPS,
},
};
......@@ -4520,7 +4540,8 @@ static void test_rt_caps(void)
i, test_data[i].caps_in, hr);
hr = IDirect3DDevice3_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