broadcom/compiler: separate texture/sampler info from v3d_key
authorAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 10 Nov 2020 21:05:10 +0000 (22:05 +0100)
committerMarge Bot <eric+marge@anholt.net>
Sat, 14 Nov 2020 15:59:02 +0000 (15:59 +0000)
commit429c33641275e02b17351ab24a693f2469cc36f3
tree31de0b77cd236a8ca7a021753dfcbee04d0db175
parent1fe52af61a4e7bf17ea6a37159b1fe1dab850b1b
broadcom/compiler: separate texture/sampler info from v3d_key

So far the v3d compiler has them combined, as for OpenGL both are the
same. This change is intended to fit the v3d compiler better with
Vulkan, where they are separate concepts.

Note that NIR has them separate for a long time, both on nir_variable
and on some NIR lowerings.

v2: (from Iago feedback)
    * Use key->num_tex/sampler_used to iterate through the array
    * Fill up num_samplers_used on v3d, assert that is the same that
      num_tex_used if possible.

v3: (Iago)
    * Assert num_tex/samplers_used is smaller that tex/sampler array size.

v4: Update assert mentioned on v3 to use <= instead of < (detected by CI)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
squash! broadcom/compiler: separate texture/sampler info from v3d_key

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7545>
src/broadcom/compiler/v3d40_tex.c
src/broadcom/compiler/v3d_compiler.h
src/broadcom/compiler/vir.c
src/broadcom/vulkan/v3dv_pipeline.c
src/gallium/drivers/v3d/v3d_program.c