summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2020-03-24 14:17:35 +1100
committerMarge Bot <[email protected]>2020-04-21 01:57:34 +0000
commit0f79e0f7c62d4ac34e6a4a827b5433402cf7c223 (patch)
tree0e5783d8ef95e449caff55e9a33a1417f0441369 /src/compiler
parent954644022771f45b1e6f719cab399a949a3fbb22 (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4395>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/gl_nir_link_uniform_initializers.c6
1 files changed, 6 insertions, 0 deletions
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);