1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

d3d8/tests: Zero stride tests crash on Windows XP, r200 GPU.

This commit is contained in:
Stefan Dösinger 2023-09-07 20:00:32 +03:00 committed by Alexandre Julliard
parent da264c4d00
commit b3e98cadfa

View file

@ -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));