[PATCH] d3d11: Honor render state FrontCounterClockwise.

Johannes Brandstätter jbrandst at 2ds.eu
Sun May 22 06:32:20 CDT 2016


This fixes geometry flickering in Unigine's Valley and Heaven bechmarks.
The user interface would at least show some parts, but using this patch
it completly vanishes as well as the credits image upon closing.

Signed-off-by: Johannes Brandstätter <jbrandst at 2ds.eu>
---
 dlls/d3d11/device.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 7fb28ac..d54f81f 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -808,10 +808,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
 
     desc = &device->rasterizer_state->desc;
     wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_FILLMODE, desc->FillMode);
-    wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_CULLMODE, desc->CullMode);
     /* glFrontFace() */
     if (desc->FrontCounterClockwise)
-        FIXME("Ignoring FrontCounterClockwise %#x.\n", desc->FrontCounterClockwise);
+        wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_CULLMODE, WINED3D_CULL_CCW);
+    else
+        wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_CULLMODE, desc->CullMode);
     /* OpenGL style depth bias. */
     if (desc->DepthBias || desc->SlopeScaledDepthBias)
         FIXME("Ignoring depth bias.\n");
-- 
2.8.1




More information about the wine-patches mailing list