From 0f79e0f7c62d4ac34e6a4a827b5433402cf7c223 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 24 Mar 2020 14:17:35 +1100 Subject: [PATCH] glsl: fix gl_nir_set_uniform_initializers() for bindless textures MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: --- src/compiler/glsl/gl_nir_link_uniform_initializers.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.30.2