From: Timothy Arceri Date: Thu, 20 Feb 2020 22:34:26 +0000 (+1100) Subject: glsl: set the correct number of samplers in a shader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b232a54df11cf6864e344b08f77c0dab5ddf0baf;p=mesa.git glsl: set the correct number of samplers in a shader Reviewed-by: Alejandro PiƱeiro Part-of: --- diff --git a/src/compiler/glsl/gl_nir_link_uniforms.c b/src/compiler/glsl/gl_nir_link_uniforms.c index 1a09843454c..fea54083335 100644 --- a/src/compiler/glsl/gl_nir_link_uniforms.c +++ b/src/compiler/glsl/gl_nir_link_uniforms.c @@ -607,7 +607,10 @@ nir_link_uniform(struct gl_context *ctx, int sampler_index = get_next_index(state, uniform, &state->next_sampler_index); - state->num_shader_samplers++; + /* Samplers (bound or bindless) are counted as two components as + * specified by ARB_bindless_texture. + */ + state->num_shader_samplers += values / 2; uniform->opaque[stage].active = true; uniform->opaque[stage].index = sampler_index;