From: Timothy Arceri Date: Thu, 27 Feb 2020 22:53:51 +0000 (+1100) Subject: glsl: set the correct number of images in a shader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=190a1ed170231d6f1db0526a1867a6766ccd4823;p=mesa.git glsl: set the correct number of images 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 fea54083335..7196d8b2c1f 100644 --- a/src/compiler/glsl/gl_nir_link_uniforms.c +++ b/src/compiler/glsl/gl_nir_link_uniforms.c @@ -636,7 +636,10 @@ nir_link_uniform(struct gl_context *ctx, int image_index = state->next_image_index; state->next_image_index += entries; - state->num_shader_images++; + /* Images (bound or bindless) are counted as two components as + * specified by ARB_bindless_texture. + */ + state->num_shader_images += values / 2; uniform->opaque[stage].active = true; uniform->opaque[stage].index = image_index;