mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
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:f32b01ca43"glsl/linker: remove ubo explicit binding handling" Reviewed-by: Marek Olšák <marek.olsak@amd.com> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1900 (cherry picked from commit1294f01e06)
This commit is contained in:
parent
b87edab8a2
commit
6f30614d73
1 changed files with 5 additions and 5 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue