etnaviv: rework modifier queries
Rework the loops in the modifier queries to make them a bit more
straight-forward and use less local variables. Those loops get
much more complex as more variations of the modifiers get added,
so the simplification done here is an attempt to keep the complexity
at bay.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9780>