Module: wine Branch: master Commit: 13e1ac0e99aa73070a65014e88dbf237c810cc65 URL: https://source.winehq.org/git/wine.git/?a=commit;h=13e1ac0e99aa73070a65014e8...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed May 20 18:30:32 2020 +0430
wined3d: Set the correct patch vertex count for the Vulkan adapter.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/context_vk.c | 13 +++++++++++++ dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 14 insertions(+)
diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index 8ab0f6366c..97d05f1dc8 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -1427,6 +1427,9 @@ static int wined3d_graphics_pipeline_vk_compare(const void *key, const struct wi if (a->ia_desc.primitiveRestartEnable != b->ia_desc.primitiveRestartEnable) return a->ia_desc.primitiveRestartEnable - b->ia_desc.primitiveRestartEnable;
+ if (a->ts_desc.patchControlPoints != b->ts_desc.patchControlPoints) + return a->ts_desc.patchControlPoints - b->ts_desc.patchControlPoints; + if ((ret = memcmp(&a->viewport, &b->viewport, sizeof(a->viewport)))) return ret;
@@ -1496,6 +1499,8 @@ static void wined3d_context_vk_init_graphics_pipeline_key(struct wined3d_context
key->ia_desc.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;
+ key->ts_desc.sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO; + key->vp_desc.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; key->vp_desc.viewportCount = 1; key->vp_desc.pViewports = &key->viewport; @@ -1526,6 +1531,7 @@ static void wined3d_context_vk_init_graphics_pipeline_key(struct wined3d_context key->pipeline_desc.pStages = key->stages; key->pipeline_desc.pVertexInputState = &key->input_desc; key->pipeline_desc.pInputAssemblyState = &key->ia_desc; + key->pipeline_desc.pTessellationState = &key->ts_desc; key->pipeline_desc.pViewportState = &key->vp_desc; key->pipeline_desc.pRasterizationState = &key->rs_desc; key->pipeline_desc.pMultisampleState = &key->ms_desc; @@ -1751,6 +1757,13 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte update = true; }
+ if (key->ts_desc.patchControlPoints != state->patch_vertex_count) + { + key->ts_desc.patchControlPoints = state->patch_vertex_count; + + update = true; + } + if (wined3d_context_is_graphics_state_dirty(&context_vk->c, STATE_VIEWPORT) || wined3d_context_is_graphics_state_dirty(&context_vk->c, STATE_SCISSORRECT) || wined3d_context_is_graphics_state_dirty(&context_vk->c, STATE_RASTERIZER)) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 3450633b61..ab5df330e7 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2331,6 +2331,7 @@ struct wined3d_graphics_pipeline_key_vk
VkPipelineVertexInputStateCreateInfo input_desc; VkPipelineInputAssemblyStateCreateInfo ia_desc; + VkPipelineTessellationStateCreateInfo ts_desc; VkPipelineViewportStateCreateInfo vp_desc; VkPipelineRasterizationStateCreateInfo rs_desc; VkPipelineMultisampleStateCreateInfo ms_desc;