From: Francisco Casas <fcasas@codeweavers.com> This command must always be submitted (with patchControlPoints >= 0) before drawing commands when the graphics pipeline is created with VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT. Otherwise we get the following Vulkan validation layer error: VUID-vkCmdDrawIndexed-None-04875(ERROR / SPEC): msgNum: -2003020972 - Validation Error: [ VUID-vkCmdDrawIndexed-None-04875 ] [...] | vkCmdDrawIndexed(): VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT state not set for this command buffer. The Vulkan spec states: If there is a shader object bound to the VK_SHADER_STAGE_VERTEX_BIT stage and the most recent call to vkCmdSetPrimitiveTopology in the current command buffer set primitiveTopology to VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, or the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled then vkCmdSetPatchControlPointsEXT must have been called in the current command buffer prior to this drawing command [...] --- dlls/wined3d/context_vk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index 629b3c3e974..689908afda3 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -4266,8 +4266,7 @@ VkCommandBuffer wined3d_context_vk_apply_draw_state(struct wined3d_context_vk *c if (vk_info->dynamic_patch_vertex_count && context_vk->c.update_patch_vertex_count) { - if (state->patch_vertex_count) - VK_CALL(vkCmdSetPatchControlPointsEXT(vk_command_buffer, state->patch_vertex_count)); + VK_CALL(vkCmdSetPatchControlPointsEXT(vk_command_buffer, max(state->patch_vertex_count, 1))); context_vk->c.update_patch_vertex_count = 0; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11688