Module: Mesa Branch: main Commit: 0cea8276bc8f43037dd260b98ba8948032cf36db URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0cea8276bc8f43037dd260b98ba8948032cf36db
Author: Samuel Pitoiset <[email protected]> Date: Tue Aug 30 16:34:14 2022 +0200 radv: add radv_pipeline_key::dynamic_patch_control_points This will be used to compile different tessellation shaders when patch control points is dynamic. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18344> --- src/amd/vulkan/radv_pipeline.c | 3 +++ src/amd/vulkan/radv_shader.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 02ee4e279c8..f6d7ac69607 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2773,6 +2773,9 @@ radv_generate_graphics_pipeline_key(const struct radv_graphics_pipeline *pipelin key.ps.has_epilog = !!pipeline->ps_epilog; + key.dynamic_patch_control_points = + !!(pipeline->dynamic_states & RADV_DYNAMIC_PATCH_CONTROL_POINTS); + return key; } diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index a6c7839434f..ebfc70ac5dc 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -62,6 +62,7 @@ struct radv_pipeline_key { uint32_t disable_sinking_load_input_fs : 1; uint32_t image_2d_view_of_3d : 1; uint32_t primitives_generated_query : 1; + uint32_t dynamic_patch_control_points : 1; struct { uint32_t instance_rate_inputs;
