radv: add radv_pipeline_key::dynamic_rasterization_samples

With GPL, it's possible to build the main FS without the multisample
state, but the number of rasterization samples is required for
lowering interpolateAtSample(). In this rare situation, the number of
samples will be passed through a new user SGPR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18677>
This commit is contained in:
Samuel Pitoiset
2022-09-15 13:36:51 +02:00
committed by Marge Bot
parent 45d4ee91e0
commit f85b7e294b
2 changed files with 4 additions and 0 deletions

View File

@@ -2818,6 +2818,9 @@ radv_generate_graphics_pipeline_key(const struct radv_graphics_pipeline *pipelin
key.dynamic_patch_control_points =
!!(pipeline->dynamic_states & RADV_DYNAMIC_PATCH_CONTROL_POINTS);
key.dynamic_rasterization_samples =
!!(pipeline->active_stages & VK_SHADER_STAGE_FRAGMENT_BIT) && !state->ms;
return key;
}

View File

@@ -63,6 +63,7 @@ struct radv_pipeline_key {
uint32_t image_2d_view_of_3d : 1;
uint32_t primitives_generated_query : 1;
uint32_t dynamic_patch_control_points : 1;
uint32_t dynamic_rasterization_samples : 1;
struct {
uint32_t instance_rate_inputs;