ddraw: Track WINED3D_RS_ZENABLE in the primary stateblock.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-11-16 17:26:32 -06:00 committed by Alexandre Julliard
parent 9fb7c84b15
commit 769ba7d1e9
2 changed files with 4 additions and 0 deletions

View File

@ -7025,6 +7025,8 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
ddraw->d3ddevice = device; 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, wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_ZENABLE,
d3d_device_update_depth_stencil(device)); d3d_device_update_depth_stencil(device));
if (version == 1) /* Color keying is initially enabled for version 1 devices. */ if (version == 1) /* Color keying is initially enabled for version 1 devices. */

View File

@ -6085,6 +6085,8 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
return hr_ddraw_from_wined3d(hr); 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, wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_ZENABLE,
!!swapchain_desc.enable_auto_depth_stencil); !!swapchain_desc.enable_auto_depth_stencil);
} }