glsl: fix sampler index calculation in nir linker
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 28 Feb 2020 01:13:55 +0000 (12:13 +1100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Feb 2020 23:48:46 +0000 (23:48 +0000)
commit61dc9354c0c9b5dae3f6763c5141ff38e3e72816
tree700eb788043eedb7d12ab47ba3efd6d17b7a4fc9
parentef47069cc30e0a3337fcb6ff0c740e1bc50879c5
glsl: fix sampler index calculation in nir linker

Here we reset the counter to 0 for each shader stage not each program.
We also make add a flag to stop iterating over indices that have
already been processed.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>
src/compiler/glsl/gl_nir_link_uniforms.c