From 227605569a105c9f6d27ebf2154c71b7c06bf4c8 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 13 Oct 2020 16:50:53 +0330 Subject: [PATCH] wined3d: Avoid accessing NULL depth/stencil state in wined3d_context_vk_update_graphics_pipeline_key(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/context_vk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index fa5aac28fd1..92b8c14e239 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -2058,6 +2058,7 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte { key->ds_desc.depthTestEnable = d->desc.depth; key->ds_desc.depthWriteEnable = d->desc.depth_write; + key->ds_desc.depthCompareOp = vk_compare_op_from_wined3d(d->desc.depth_func); key->ds_desc.stencilTestEnable = state->fb.depth_stencil && d->desc.stencil; if (key->ds_desc.stencilTestEnable) { @@ -2084,9 +2085,9 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte { key->ds_desc.depthTestEnable = VK_TRUE; key->ds_desc.depthWriteEnable = VK_TRUE; + key->ds_desc.depthCompareOp = VK_COMPARE_OP_LESS; key->ds_desc.stencilTestEnable = VK_FALSE; } - key->ds_desc.depthCompareOp = vk_compare_op_from_wined3d(d->desc.depth_func); update = true; } -- 2.11.4.GIT