From a5abe2c53af5a155d89f253c3c44d9283858ad57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Mon, 20 Feb 2017 22:31:03 +0000 Subject: [PATCH] d3d9/tests: Work around a r500 Windows point sprite bug. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Dösinger Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d9/tests/visual.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 4de3beba6d4..72005ff737b 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -10641,6 +10641,17 @@ static void test_pointsize(void) goto done; } + /* The r500 Windows driver needs a draw with regular texture coordinates at least once during the + * device's lifetime, otherwise texture coordinate generation only works for texture 0. */ + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); + ok(SUCCEEDED(hr), "Failed to set FVF, hr=%#x.\n", hr); + hr = IDirect3DDevice9_BeginScene(device); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_POINTLIST, 1, vertices, sizeof(float) * 5); + ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + hr = IDirect3DDevice9_EndScene(device); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE);