graphics: pass the real patch control point count for tessellation

Tessellation draws were created with a hardcoded 3 control points per patch.
Take the count from VGT_LS_HS_CONFIG.HS_NUM_INPUT_CP instead, and key the
pipeline cache on it so patches of different sizes do not share a pipeline.
This commit is contained in:
Mac
2026-08-31 23:40:51 +05:30
parent ce782ef77f
commit 3cd6ff0a3f
7 changed files with 373 additions and 53 deletions
@@ -913,7 +913,7 @@ void CreatePipelineInternal(
pipeline_info.pInputAssemblyState = &input_assembly;
vk::PipelineTessellationStateCreateInfo tessellation_state {};
tessellation_state.sType = vk::StructureType::ePipelineTessellationStateCreateInfo;
tessellation_state.patchControlPoints = 3;
tessellation_state.patchControlPoints = static_params.patch_control_points;
pipeline_info.pTessellationState = (rect_list ? &tessellation_state : nullptr);
pipeline_info.pViewportState = &viewport_state;
pipeline_info.pRasterizationState = &rasterizer;
@@ -976,6 +976,8 @@ void CreatePipelineInternal(GraphicContext& graphics, PipelineCache::ComputePipe
comp_shader_stage_info.pSpecializationInfo = nullptr;
EXIT_IF(!input_info.stage);
const auto wave_size = input_info.stage.program->wave_size;
{
}
if (graphics.compute_subgroup_size_control_enabled &&
wave_size >= graphics.min_subgroup_size && wave_size <= graphics.max_subgroup_size) {
comp_subgroup_size.sType =