From: Timothy Arceri Date: Tue, 24 Mar 2020 03:17:35 +0000 (+1100) Subject: glsl: fix gl_nir_set_uniform_initializers() for bindless textures X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f79e0f7c62d4ac34e6a4a827b5433402cf7c223;p=mesa.git glsl: fix gl_nir_set_uniform_initializers() for bindless textures We need to skip opaque variables inside blocks, this is handled elsewhere and will cause a crash here. Reviewed-by: Alejandro PiƱeiro Part-of: --- diff --git a/src/compiler/glsl/gl_nir_link_uniform_initializers.c b/src/compiler/glsl/gl_nir_link_uniform_initializers.c index 752eedb63aa..fe01b5cb268 100644 --- a/src/compiler/glsl/gl_nir_link_uniform_initializers.c +++ b/src/compiler/glsl/gl_nir_link_uniform_initializers.c @@ -278,6 +278,12 @@ gl_nir_set_uniform_initializers(struct gl_context *ctx, var->type, var->constant_initializer); } else if (var->data.explicit_binding) { + + if (nir_variable_is_in_block(var)) { + /* This case is handled by link_uniform_blocks */ + continue; + } + const struct glsl_type *without_array = glsl_without_array(var->type);