diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index c7b3a721065..35d90f77ee2 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -1976,20 +1976,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; } if (states & ANV_CMD_DIRTY_DYNAMIC_RASTERIZER_DISCARD_ENABLE) { diff --git a/src/intel/vulkan/gfx8_cmd_buffer.c b/src/intel/vulkan/gfx8_cmd_buffer.c index 59202fa8952..f428c022cf8 100644 --- a/src/intel/vulkan/gfx8_cmd_buffer.c +++ b/src/intel/vulkan/gfx8_cmd_buffer.c @@ -642,7 +642,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_intel_primitive_type)[d->primitive_topology];