radv: simplify load_sample_mask_in lowering
From the Vulkan spec: "Sample shading is enabled if at least one of the following conditions is true: - VkPipelineMultisampleStateCreateInfo::sampleShadingEnable is set to VK_TRUE, or - the fragment shader’s entry point interface includes input variables decorated with a BuiltIn of SampleId or SamplePosition built-ins." We don't need to pass the number of rasterization samples, checking for sample shading is enough. This will help for dynamic rasterization samples. 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/19654>
This commit is contained in:

committed by
Marge Bot

parent
0097592f8c
commit
5c9ade2464
@@ -2829,10 +2829,11 @@ radv_generate_graphics_pipeline_key(const struct radv_graphics_pipeline *pipelin
|
||||
if (state->ts)
|
||||
key.tcs.tess_input_vertices = state->ts->patch_control_points;
|
||||
|
||||
if (state->ms && state->ms->rasterization_samples > 1) {
|
||||
uint32_t ps_iter_samples = radv_pipeline_get_ps_iter_samples(state);
|
||||
key.ps.num_samples = state->ms->rasterization_samples;
|
||||
key.ps.log2_ps_iter_samples = util_logbase2(ps_iter_samples);
|
||||
if (state->ms) {
|
||||
key.ps.sample_shading_enable = state->ms->sample_shading_enable;
|
||||
if (state->ms->rasterization_samples > 1) {
|
||||
key.ps.num_samples = state->ms->rasterization_samples;
|
||||
}
|
||||
}
|
||||
|
||||
key.ps.col_format = blend->spi_shader_col_format;
|
||||
|
Reference in New Issue
Block a user