diff --git a/.pick_status.json b/.pick_status.json index eb726330477..914502a4fdc 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1075,7 +1075,7 @@ "description": "anv: fix dynamic primitive topology for tess", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f6fa4a8000053fc6e9a25a30f482c59466390898" }, diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 79afde9b877..a0284964e2b 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -1926,20 +1926,7 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline, if (states & ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY) { assert(pCreateInfo->pInputAssemblyState); - bool has_tess = false; - for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) { - const VkPipelineShaderStageCreateInfo *sinfo = &pCreateInfo->pStages[i]; - gl_shader_stage stage = vk_to_mesa_shader_stage(sinfo->stage); - if (stage == MESA_SHADER_TESS_CTRL || stage == MESA_SHADER_TESS_EVAL) - has_tess = true; - } - if (has_tess) { - const VkPipelineTessellationStateCreateInfo *tess_info = - pCreateInfo->pTessellationState; - dynamic->primitive_topology = _3DPRIM_PATCHLIST(tess_info->patchControlPoints); - } else { - dynamic->primitive_topology = pCreateInfo->pInputAssemblyState->topology; - } + dynamic->primitive_topology = pCreateInfo->pInputAssemblyState->topology; } /* Section 9.2 of the Vulkan 1.0.15 spec says: diff --git a/src/intel/vulkan/gfx8_cmd_buffer.c b/src/intel/vulkan/gfx8_cmd_buffer.c index 2631247ba28..9388485b4df 100644 --- a/src/intel/vulkan/gfx8_cmd_buffer.c +++ b/src/intel/vulkan/gfx8_cmd_buffer.c @@ -637,7 +637,7 @@ genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer) ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY)) { uint32_t topology; if (anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_EVAL)) - topology = d->primitive_topology; + topology = pipeline->topology; else topology = genX(vk_to_gen_primitive_type)[d->primitive_topology];