summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/linker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r--src/compiler/glsl/linker.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index f750f5b7722..d9a681ccca1 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3804,7 +3804,9 @@ calculate_array_size_and_stride(struct gl_shader_program *shProg,
int array_stride = -1;
char *var_name = get_top_level_name(uni->name);
char *interface_name =
- get_top_level_name(shProg->BufferInterfaceBlocks[block_index].Name);
+ get_top_level_name(uni->is_shader_storage ?
+ shProg->ShaderStorageBlocks[block_index]->Name :
+ shProg->UniformBlocks[block_index]->Name);
if (strcmp(var_name, interface_name) == 0) {
/* Deal with instanced array of SSBOs */
@@ -3941,12 +3943,14 @@ build_program_resource_list(struct gl_context *ctx,
ir_var_uniform);
/* Add stagereferences for uniforms in a uniform block. */
+ bool is_shader_storage = shProg->UniformStorage[i].is_shader_storage;
int block_index = shProg->UniformStorage[i].block_index;
if (block_index != -1) {
- stageref |= shProg->BufferInterfaceBlocks[block_index].stageref;
+ stageref |= is_shader_storage ?
+ shProg->ShaderStorageBlocks[block_index]->stageref :
+ shProg->UniformBlocks[block_index]->stageref;
}
- bool is_shader_storage = shProg->UniformStorage[i].is_shader_storage;
GLenum type = is_shader_storage ? GL_BUFFER_VARIABLE : GL_UNIFORM;
if (!should_add_buffer_variable(shProg, type,
shProg->UniformStorage[i].name))