Module: Mesa Branch: master Commit: ef47069cc30e0a3337fcb6ff0c740e1bc50879c5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ef47069cc30e0a3337fcb6ff0c740e1bc50879c5
Author: Timothy Arceri <[email protected]> Date: Mon Feb 10 09:19:44 2020 +1100 glsl: reset next_image_index count for each shader stage 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992> --- src/compiler/glsl/gl_nir_link_uniforms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/gl_nir_link_uniforms.c b/src/compiler/glsl/gl_nir_link_uniforms.c index 7249829c564..8c55b9a2dc1 100644 --- a/src/compiler/glsl/gl_nir_link_uniforms.c +++ b/src/compiler/glsl/gl_nir_link_uniforms.c @@ -245,9 +245,9 @@ struct nir_link_uniforms_state { 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; @@ -706,6 +706,7 @@ gl_nir_link_uniforms(struct gl_context *ctx, 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; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
