d3d8: Toggle depth test state based on auto depth stencil.

wined3d will not do this anymore

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-12-06 11:00:36 +01:00 committed by Alexandre Julliard
parent b2b03085dc
commit cf86309c58
1 changed files with 3 additions and 2 deletions

View File

@ -3271,8 +3271,7 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
return D3DERR_INVALIDCALL;
}
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);
@ -3282,6 +3281,8 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
return hr;
}
wined3d_device_set_render_state(device->wined3d_device,
WINED3D_RS_ZENABLE, !!swapchain_desc.enable_auto_depth_stencil);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_POINTSIZE_MIN, 0);
wined3d_mutex_unlock();