From 190a1ed170231d6f1db0526a1867a6766ccd4823 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 28 Feb 2020 09:53:51 +1100 Subject: [PATCH] glsl: set the correct number of images in a shader MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Alejandro Piñeiro Part-of: --- src/compiler/glsl/gl_nir_link_uniforms.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.30.2