Module: wine Branch: master Commit: da264c4d0041eae62476f9e49f93a6af7add2b21 URL: https://gitlab.winehq.org/wine/wine/-/commit/da264c4d0041eae62476f9e49f93a6a...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Sep 7 19:28:04 2023 +0300
d3d9/tests: Zero stride tests crash on Windows XP, r200 GPU.
---
dlls/d3d9/tests/device.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index c972e97f572..2347841b66f 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -3172,10 +3172,14 @@ static void test_draw_primitive(void) hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLELIST, 0, 2); ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#lx.\n", hr);
- hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 2, quad, 0); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); - hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, quad, 0); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); + /* Crashes on r200, Windows XP with STATUS_INTEGER_DIVIDE_BY_ZERO. */ + if (0) + { + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 2, quad, 0); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, quad, 0); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); + }
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 2, quad, sizeof(*quad)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#lx.\n", hr); @@ -3205,12 +3209,16 @@ static void test_draw_primitive(void) ok(current_ib == index_buffer, "Unexpected index buffer %p.\n", current_ib); IDirect3DIndexBuffer9_Release(current_ib);
- hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2, - indices, D3DFMT_INDEX16, quad, 0); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); - hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 0, - indices, D3DFMT_INDEX16, quad, 0); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); + /* Crashes on r200, Windows XP with STATUS_INTEGER_DIVIDE_BY_ZERO. */ + if (0) + { + hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2, + indices, D3DFMT_INDEX16, quad, 0); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); + hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 0, + indices, D3DFMT_INDEX16, quad, 0); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); + }
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2, indices, D3DFMT_INDEX16, quad, sizeof(*quad));