return NULL;
}
+static const VkPipelineTessellationStateCreateInfo *
+radv_pipeline_get_tessellation_state(const VkGraphicsPipelineCreateInfo *pCreateInfo)
+{
+ for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) {
+ if (pCreateInfo->pStages[i].stage == VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT ||
+ pCreateInfo->pStages[i].stage == VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT) {
+ return pCreateInfo->pTessellationState;
+ }
+ }
+ return NULL;
+}
+
bool radv_pipeline_has_ngg(const struct radv_pipeline *pipeline)
{
struct radv_shader_variant *variant = NULL;
}
}
- if (pCreateInfo->pTessellationState)
- key.tess_input_vertices = pCreateInfo->pTessellationState->patchControlPoints;
+ const VkPipelineTessellationStateCreateInfo *tess =
+ radv_pipeline_get_tessellation_state(pCreateInfo);
+ if (tess)
+ key.tess_input_vertices = tess->patchControlPoints;
const VkPipelineMultisampleStateCreateInfo *vkms =
radv_pipeline_get_multisample_state(pCreateInfo);