From 3b06fc92f479f8ae2e23990f38e1fc2185138b81 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 10 Aug 2009 09:30:50 +0200 Subject: [PATCH] wined3d: Use EXT_provoking_vertex to match Direct3D's provoking vertex convention. --- dlls/d3d9/tests/visual.c | 11 +++++++++-- dlls/wined3d/context.c | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 2a86be8aadb..d4fabf373b3 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -6586,8 +6586,15 @@ static void shademode_test(IDirect3DDevice9 *device) switch(shademode) { case D3DSHADE_FLAT: /* Should take the color of the first vertex of each triangle */ - todo_wine ok(color0 == 0x00ff0000, "FLAT shading has color0 %08x, expected 0x00ff0000 (todo)\n", color0); - todo_wine ok(color1 == 0x0000ff00, "FLAT shading has color1 %08x, expected 0x0000ff00 (todo)\n", color1); + if (0) + { + /* This test depends on EXT_provoking_vertex being + * available. This extension is currently (20090810) + * not common enough to let the test fail if it isn't + * present. */ + ok(color0 == 0x00ff0000, "FLAT shading has color0 %08x, expected 0x00ff0000\n", color0); + ok(color1 == 0x0000ff00, "FLAT shading has color1 %08x, expected 0x0000ff00\n", color1); + } shademode = D3DSHADE_GOURAUD; break; case D3DSHADE_GOURAUD: diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 073707939f6..09743c69a9b 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1357,6 +1357,12 @@ struct wined3d_context *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceI glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE); checkGLcall("glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)"); } + + if (GL_SUPPORT(EXT_PROVOKING_VERTEX)) + { + GL_EXTCALL(glProvokingVertexEXT(GL_FIRST_VERTEX_CONVENTION_EXT)); + } + LEAVE_GL(); This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE);