etnaviv: slim down etna_shader_key
authorLucas Stach <l.stach@pengutronix.de>
Wed, 5 Oct 2022 13:14:50 +0000 (15:14 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 7 Oct 2022 08:36:31 +0000 (08:36 +0000)
commita1af7ae96a447c05754af8317c935c4588cb8580
tree34752a8f7b837bfa0c5778cd4a8b4f950302a372
parent1964899c28ffcb2f1db180195ee1677280ecc231
etnaviv: slim down etna_shader_key

The max number of exposed fragment samplers and views on any hardware is 16,
so there is no point in having arrays of 128 entries to track information
for the shadow sampler lowering in the shader key. Most of them will never
be used. Reduce the size of the arrays to what is actually necessary and add
a assert to make sure the sampler (view) limit isn't bumped without a
matching change in the shader key.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18968>
src/gallium/drivers/etnaviv/etnaviv_shader.c
src/gallium/drivers/etnaviv/etnaviv_shader.h