summaryrefslogtreecommitdiffstats
path: root/src/glsl/link_uniform_initializers.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-08-14 17:25:04 -0700
committerJason Ekstrand <[email protected]>2015-08-17 11:25:03 -0700
commit6a7ca4ef2cd3f39d3b5e77051cb3f3175e9e60df (patch)
treed5413781ac9e9ecfc22cf403fa7465d6a7cadb34 /src/glsl/link_uniform_initializers.cpp
parentb4c02253c4e1a7bc5a7a6369045210932f5de605 (diff)
parentd3e23f1ff915c01541f8df375b50b93b3da565a8 (diff)
Merge remote-tracking branch 'mesa-public/master' into vulkan
Diffstat (limited to 'src/glsl/link_uniform_initializers.cpp')
-rw-r--r--src/glsl/link_uniform_initializers.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/glsl/link_uniform_initializers.cpp b/src/glsl/link_uniform_initializers.cpp
index 5f57079d1b8..c482fbfdfb2 100644
--- a/src/glsl/link_uniform_initializers.cpp
+++ b/src/glsl/link_uniform_initializers.cpp
@@ -90,6 +90,7 @@ copy_constant_to_storage(union gl_constant_value *storage,
case GLSL_TYPE_INTERFACE:
case GLSL_TYPE_FUNCTION:
case GLSL_TYPE_VOID:
+ case GLSL_TYPE_SUBROUTINE:
case GLSL_TYPE_ERROR:
/* All other types should have already been filtered by other
* paths in the caller.
@@ -257,7 +258,8 @@ link_set_uniform_initializers(struct gl_shader_program *prog,
foreach_in_list(ir_instruction, node, shader->ir) {
ir_variable *const var = node->as_variable();
- if (!var || var->data.mode != ir_var_uniform)
+ if (!var || (var->data.mode != ir_var_uniform &&
+ var->data.mode != ir_var_shader_storage))
continue;
if (!mem_ctx)
@@ -268,7 +270,7 @@ link_set_uniform_initializers(struct gl_shader_program *prog,
if (type->without_array()->is_sampler()) {
linker::set_sampler_binding(prog, var->name, var->data.binding);
- } else if (var->is_in_uniform_block()) {
+ } else if (var->is_in_buffer_block()) {
const glsl_type *const iface_type = var->get_interface_type();
/* If the variable is an array and it is an interface instance,
@@ -281,7 +283,7 @@ link_set_uniform_initializers(struct gl_shader_program *prog,
* float f[4];
* };
*
- * In this case "f" would pass is_in_uniform_block (above) and
+ * In this case "f" would pass is_in_buffer_block (above) and
* type->is_array(), but it will fail is_interface_instance().
*/
if (var->is_interface_instance() && var->type->is_array()) {