Nothing enforces this except perhaps the implicit structure of shader keys.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
if (variants->variant_space == 0)
variants->variant_space = 1;
- /* Arbitrary limit to stop runaway programs from
- * creating an unbounded number of shader variants. */
- assert(variants->variant_space < 1024);
-
unsigned msize = sizeof(struct panfrost_shader_state);
variants->variants = realloc(variants->variants,
variants->variant_space * msize);