ac/nir: Only store params to attribute ring that are varying.

On GFX11+, varying outputs from the last pre-rasterization stage
are implemented by storing the outputs to the so-called
attribute ring.

Make sure to only store them when necessary.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
This commit is contained in:
Timur Kristóf
2024-12-14 18:20:28 -06:00
parent 13234a8a8a
commit de2cb4a7d3

View File

@@ -631,6 +631,9 @@ ac_nir_store_parameters_to_attr_ring(nir_builder *b,
if (offset > AC_EXP_PARAM_OFFSET_31)
continue;
if (!out->infos[slot].as_varying_mask)
continue;
if (exported_params & BITFIELD_BIT(offset))
continue;
@@ -653,6 +656,10 @@ ac_nir_store_parameters_to_attr_ring(nir_builder *b,
if (offset > AC_EXP_PARAM_OFFSET_31)
continue;
if (!out->infos_16bit_lo[i].as_varying_mask &&
!out->infos_16bit_hi[i].as_varying_mask)
continue;
if (exported_params & BITFIELD_BIT(offset))
continue;