anv: Rework the descriptor set layout create loop
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 19 Apr 2019 19:45:34 +0000 (14:45 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 19 Apr 2019 23:26:41 +0000 (23:26 +0000)
commit828ec411545ee6cdcabe228002fca3e4c5d14274
tree1ea0c5bd4bc71dca1399f5af987fdfdf94cdf4db
parent2b388c3d0404ab8cc20945b9d4c369c9051c2205
anv: Rework the descriptor set layout create loop

Previously, we were storing the per-binding create info pointer in the
immutable_samplers field temporarily so that we can switch the order in
which we walk the loop.  However, now that we have multiple arrays of
structs to walk, it makes more sense to store an index of some sort.
Because we want to leave immutable_samplers as NULL for undefined
bindings, we store index + 1 and then subtract one later.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/intel/vulkan/anv_descriptor_set.c