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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user