[PATCH 1/3] wined3d: Avoid accessing NULL depth/stencil state in wined3d_context_vk_update_graphics_pipeline_key().
Henri Verbeet
hverbeet at codeweavers.com
Tue Oct 13 08:20:53 CDT 2020
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
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.20.1
More information about the wine-devel
mailing list