Józef Kucia : d3d8: Toggle depth test state based on auto depth stencil.
Module: wine Branch: master Commit: cf86309c588dfca29ef5c291cc6d607678308489 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cf86309c588dfca29ef5c291cc... Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Dec 6 11:00:36 2017 +0100 d3d8: Toggle depth test state based on auto depth stencil. wined3d will not do this anymore Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 8b6bd3f..f77fb27 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -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();
participants (1)
-
Alexandre Julliard