radv: ignore pTessellationState if the pipeline doesn't use tess
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3167>
This commit is contained in:
@@ -99,6 +99,18 @@ radv_pipeline_get_multisample_state(const VkGraphicsPipelineCreateInfo *pCreateI
|
|||||||
return NULL;
|
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)
|
bool radv_pipeline_has_ngg(const struct radv_pipeline *pipeline)
|
||||||
{
|
{
|
||||||
struct radv_shader_variant *variant = NULL;
|
struct radv_shader_variant *variant = NULL;
|
||||||
@@ -2273,8 +2285,10 @@ radv_generate_graphics_pipeline_key(struct radv_pipeline *pipeline,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pCreateInfo->pTessellationState)
|
const VkPipelineTessellationStateCreateInfo *tess =
|
||||||
key.tess_input_vertices = pCreateInfo->pTessellationState->patchControlPoints;
|
radv_pipeline_get_tessellation_state(pCreateInfo);
|
||||||
|
if (tess)
|
||||||
|
key.tess_input_vertices = tess->patchControlPoints;
|
||||||
|
|
||||||
const VkPipelineMultisampleStateCreateInfo *vkms =
|
const VkPipelineMultisampleStateCreateInfo *vkms =
|
||||||
radv_pipeline_get_multisample_state(pCreateInfo);
|
radv_pipeline_get_multisample_state(pCreateInfo);
|
||||||
|
Reference in New Issue
Block a user