diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index cdb2e9c2ba9..4ad1fdb7f57 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -7025,6 +7025,8 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw, ddraw->d3ddevice = device; + wined3d_stateblock_set_render_state(ddraw->state, WINED3D_RS_ZENABLE, + d3d_device_update_depth_stencil(device)); wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_ZENABLE, d3d_device_update_depth_stencil(device)); if (version == 1) /* Color keying is initially enabled for version 1 devices. */ diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 89e5024c0ef..fda42f2982f 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -6085,6 +6085,8 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ return hr_ddraw_from_wined3d(hr); } + wined3d_stateblock_set_render_state(ddraw->state, WINED3D_RS_ZENABLE, + !!swapchain_desc.enable_auto_depth_stencil); wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_ZENABLE, !!swapchain_desc.enable_auto_depth_stencil); }