Commit 13e1ac0e authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Set the correct patch vertex count for the Vulkan adapter.

parent 99f4f16b
......@@ -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))
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment