wined3d: Avoid accessing NULL depth/stencil state in wined3d_context_vk_update_graphics_pipeline_key().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a1dc382812
commit
227605569a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue