This allows menu items to be rendered in Snowrunner. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> --- The mentioned graphical error is probably a regression caused by the recent clear patches, but I haven't verified that. dlls/wined3d/state.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 228b4901c00..a732182d6c5 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -146,9 +146,25 @@ void * CDECL wined3d_depth_stencil_state_get_parent(const struct wined3d_depth_s return state->parent; } +static bool stencil_op_writes_ds(const struct wined3d_stencil_op_desc *desc) +{ + return desc->fail_op != WINED3D_STENCIL_OP_KEEP + || desc->depth_fail_op != WINED3D_STENCIL_OP_KEEP + || desc->pass_op != WINED3D_STENCIL_OP_KEEP; +} + static bool depth_stencil_state_desc_writes_ds(const struct wined3d_depth_stencil_state_desc *desc) { - return desc->depth_write; + if (desc->depth_write) + return true; + + if (desc->stencil && desc->stencil_write_mask) + { + if (stencil_op_writes_ds(&desc->front) || stencil_op_writes_ds(&desc->back)) + return true; + } + + return false; } HRESULT CDECL wined3d_depth_stencil_state_create(struct wined3d_device *device, -- 2.36.1