etnaviv: clean up component use setting in linker

Use a trivial loop instead of duplicating the code for each
component.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32922>
This commit is contained in:
Lucas Stach 2025-01-06 21:56:27 +01:00 committed by Marge Bot
parent cca43e76e1
commit 2483d28d0b

View file

@ -1397,10 +1397,8 @@ etna_link_shader(struct etna_shader_link_info *info,
else /* texture coord or other bypasses flat shading */
varying->pa_attributes = 0x2f1;
varying->use[0] = VARYING_COMPONENT_USE_GENERIC;
varying->use[1] = VARYING_COMPONENT_USE_GENERIC;
varying->use[2] = VARYING_COMPONENT_USE_GENERIC;
varying->use[3] = VARYING_COMPONENT_USE_GENERIC;
for (int i = 0; i < 4; i++)
varying->use[i] = VARYING_COMPONENT_USE_GENERIC;
/* point/tex coord is an input to the PS without matching VS output,
* so it gets a varying slot without being assigned a VS register.