Module: wine Branch: master Commit: e154c95355227659524dd449e73f08a48e3b951c URL: https://source.winehq.org/git/wine.git/?a=commit;h=e154c95355227659524dd449e...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Oct 13 17:08:54 2020 +0330
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 hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 92b8c14e23..f125884215 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 {