From: Stefan Dösinger stefan@codeweavers.com
--- dlls/d3d8/tests/device.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index b61ad207cc9..e915272b870 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -10329,8 +10329,12 @@ static void test_draw_primitive(void) ok(stride == sizeof(*quad), "Unexpected stride %u.\n", stride); IDirect3DVertexBuffer8_Release(current_vb);
- hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, quad, 0); - ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr %#lx.\n", hr); + /* Crashes on r200, Windows XP with STATUS_INTEGER_DIVIDE_BY_ZERO. */ + if (0) + { + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, quad, 0); + ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr %#lx.\n", hr); + } hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, quad, sizeof(*quad)); ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr %#lx.\n", hr);
@@ -10360,12 +10364,16 @@ static void test_draw_primitive(void) ok(base_vertex_index == 1, "Unexpected base vertex index %u.\n", base_vertex_index); IDirect3DIndexBuffer8_Release(current_ib);
- hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 0, - indices, D3DFMT_INDEX16, quad, 0); - ok(SUCCEEDED(hr), "DrawIndexedPrimitiveUP failed, hr %#lx.\n", hr); - hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2, - indices, D3DFMT_INDEX16, quad, 0); - ok(SUCCEEDED(hr), "DrawIndexedPrimitiveUP failed, hr %#lx.\n", hr); + /* Crashes on r200, Windows XP with STATUS_INTEGER_DIVIDE_BY_ZERO. */ + if (0) + { + hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 0, + indices, D3DFMT_INDEX16, quad, 0); + ok(SUCCEEDED(hr), "DrawIndexedPrimitiveUP failed, hr %#lx.\n", hr); + hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2, + indices, D3DFMT_INDEX16, quad, 0); + ok(SUCCEEDED(hr), "DrawIndexedPrimitiveUP failed, hr %#lx.\n", hr); + }
hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2, indices, D3DFMT_INDEX16, quad, sizeof(*quad));