Commit 22760556 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Avoid accessing NULL depth/stencil state in…

wined3d: Avoid accessing NULL depth/stencil state in wined3d_context_vk_update_graphics_pipeline_key(). Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a1dc3828
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment