diff options
author | Timothy Arceri <[email protected]> | 2019-10-11 16:23:48 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-10-12 22:04:23 +1100 |
commit | 1294f01e061d9490fa97c35f03ef845e06fd14ab (patch) | |
tree | 70bdd207aebc175403da896cd6797af58c37a0f0 /src | |
parent | cece947a8dfadbaed45a59f86d357afb50f25f48 (diff) |
glsl: fix crash compiling bindless samplers inside unnamed UBOs
The check to see if we were dealing with a buffer block was
too late and only worked for named UBOs.
Fixes: f32b01ca435c "glsl/linker: remove ubo explicit binding handling"
Reviewed-by: Marek Olšák <[email protected]>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1900
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/link_uniform_initializers.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/glsl/link_uniform_initializers.cpp b/src/compiler/glsl/link_uniform_initializers.cpp index 61b324592df..076ff5cea30 100644 --- a/src/compiler/glsl/link_uniform_initializers.cpp +++ b/src/compiler/glsl/link_uniform_initializers.cpp @@ -283,15 +283,15 @@ link_set_uniform_initializers(struct gl_shader_program *prog, if (var->data.explicit_binding) { const glsl_type *const type = var->type; - if (type->without_array()->is_sampler() || + if (var->is_in_buffer_block()) { + /* This case is handled by link_uniform_blocks (at + * process_block_array_leaf) + */ + } else if (type->without_array()->is_sampler() || type->without_array()->is_image()) { int binding = var->data.binding; linker::set_opaque_binding(mem_ctx, prog, var, var->type, var->name, &binding); - } else if (var->is_in_buffer_block()) { - /* This case is handled by link_uniform_blocks (at - * process_block_array_leaf) - */ } else if (type->contains_atomic()) { /* we don't actually need to do anything. */ } else { |