From e154c95355227659524dd449e73f08a48e3b951c Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 13 Oct 2020 16:50:54 +0330 Subject: [PATCH] wined3d: Clear the graphics pipeline key stencil test state when the stencil test is disabled. The state itself is ignored in this case, but could still cause additional pipeline variants to be created. That's mostly a consideration for Direct3D 9 and before, since Direct3D 10 and 11 already normalise disabled stencil test state themselves. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/context_vk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index 92b8c14e239..f1258842152 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -2080,6 +2080,11 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte key->ds_desc.back.reference = state->render_states[WINED3D_RS_STENCILREF] & ((1 << state->fb.depth_stencil->format->stencil_size) - 1); } + else + { + memset(&key->ds_desc.front, 0, sizeof(key->ds_desc.front)); + memset(&key->ds_desc.back, 0, sizeof(key->ds_desc.back)); + } } else {