anv: Use a dynamic array for storing executables in pipeline
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 3 Mar 2020 18:19:15 +0000 (10:19 -0800)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 12 Mar 2020 20:18:54 +0000 (13:18 -0700)
commit9bf044d2541e1612419ff2ba41758e71a6fd9a9c
tree32ed0f4ef74fe37ab3ac76901a08ddf1abbd14bd
parent9b0682df82041fe1ba7136a97a74be7ba4c08de7
anv: Use a dynamic array for storing executables in pipeline

Avoids waste for pipelines that don't use all the shaders, and is
flexible enough to cover cases where there are multiple variants per
shader (e.g. SIMD8/16/32 for fragment shader).

Even though we could pre-calculate the exact size of the array, this
is not a critical path so it is worth preventing the bug that will
likely happen when new variants are added but not accounted for.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4040>
src/intel/vulkan/anv_pipeline.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_pipeline.c