This fixes the image index calculation in the nir linker. We need
to reset the counter to 0 for each shader stage not each program.
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>
unsigned num_values;
unsigned max_uniform_location;
unsigned next_sampler_index;
- unsigned next_image_index;
/* per-shader stage */
+ unsigned next_image_index;
unsigned num_shader_samplers;
unsigned num_shader_images;
unsigned num_shader_uniform_components;
nir_shader *nir = sh->Program->nir;
assert(nir);
+ state.next_image_index = 0;
state.num_shader_samplers = 0;
state.num_shader_images = 0;
state.num_shader_uniform_components = 0;