[PATCH 2/2] wined3d: Check for stencil reference change in vulkan backend.
Henri Verbeet
hverbeet at gmail.com
Wed Feb 3 05:14:29 CST 2021
On Wed, 3 Feb 2021 at 11:01, Jan Sikorski <jsikorski at codeweavers.com> wrote:
> + if (wined3d_context_is_graphics_state_dirty(&context_vk->c, STATE_STENCIL_REF)
> + && state->depth_stencil_state && state->depth_stencil_state->desc.stencil)
> + {
> + VK_CALL(vkCmdSetStencilReference(vk_command_buffer, VK_STENCIL_FACE_FRONT_AND_BACK,
> + state->stencil_ref & ((1 << state->fb.depth_stencil->format->stencil_size) - 1)));
> + }
> +
The check for stencil enable above works because we always invalidate
the stencil reference when setting the depth/stencil state in
wined3d_cs_exec_set_depth_stencil_state(), but it seems fragile to
rely on that.
Dynamic state needs to be invalidated when the current command buffer
is ended in wined3d_context_vk_submit_command_buffer().
More information about the wine-devel
mailing list