=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: d3d8/tests: Work around a r500 Windows point sprite bug.

Alexandre Julliard julliard at winehq.org
Tue Feb 21 16:56:14 CST 2017


Module: wine
Branch: master
Commit: 3ba0872239264bf45792eeed0a88f39b01bae7fc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3ba0872239264bf45792eeed0a88f39b01bae7fc

Author: Stefan Dösinger <stefandoesinger at gmx.at>
Date:   Mon Feb 20 22:31:02 2017 +0000

d3d8/tests: Work around a r500 Windows point sprite bug.

Signed-off-by: Stefan Dösinger <stefandoesinger at gmx.at>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d8/tests/visual.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
index a7177d3..d314edb 100644
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -6937,6 +6937,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 = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_TEX1);
+    ok(SUCCEEDED(hr), "Failed to set FVF, hr=%#x.\n", hr);
+    hr = IDirect3DDevice8_BeginScene(device);
+    ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
+    hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_POINTLIST, 1, vertices, sizeof(float) * 5);
+    ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
+    hr = IDirect3DDevice8_EndScene(device);
+    ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
+
     hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0);
     ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
     hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, FALSE);




More information about the wine-cvs mailing list