v3dv/pipeline: iterate used textures using the combined index map
authorAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 22 Jun 2020 15:20:24 +0000 (17:20 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:31 +0000 (21:21 +0000)
commit6e0cec5a13223f243497454635237a66e6c5ca21
treeebde08c103399215df1aa9b5fc330796306a51ad
parentb9dd7e30a69d1ae8fabc0ae7133021b5b4c22bab
v3dv/pipeline: iterate used textures using the combined index map

So far we were using nir->data.num_textures to fill the default values
for the textures used on the shader, and set the value for the number
of textures used.

But nir->data.num_textures doesn't take into account input
attachments, even after nir_lower_input_attachments. Although that
could make sense from a general pov, in our case we are treating input
attachments mostly as textures.

This commit count the number of textures interating through the
pipeline combined index map, as it includes both. This also makes the
populate of the shader key for default values more similar to the one
done at cmd_buffer with real values.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
src/broadcom/vulkan/v3dv_pipeline.c