From ad0ad75b5d421b582e170208ba9e56610983e68e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B3zef=20Kucia?= Date: Wed, 6 Dec 2017 11:00:37 +0100 Subject: [PATCH] d3d9: Toggle depth test state based on auto depth stencil. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit wined3d will not do this anymore Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d9/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 655318eab5c..20f73c0e212 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -4092,8 +4092,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine } } - hr = wined3d_device_init_3d(device->wined3d_device, swapchain_desc); - if (FAILED(hr)) + if (FAILED(hr = wined3d_device_init_3d(device->wined3d_device, swapchain_desc))) { WARN("Failed to initialize 3D, hr %#x.\n", hr); wined3d_device_release_focus_window(device->wined3d_device); @@ -4103,6 +4102,9 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine return hr; } + wined3d_device_set_render_state(device->wined3d_device, + WINED3D_RS_ZENABLE, !!swapchain_desc->enable_auto_depth_stencil); + if (FAILED(hr = d3d9_device_get_swapchains(device))) { wined3d_device_uninit_3d(device->wined3d_device); -- 2.11.4.GIT