diff options
author | Kenneth Graunke <[email protected]> | 2015-11-15 04:32:52 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-01-06 15:55:25 -0800 |
commit | 6aa5cb34d03765b7be8611aa516bc201bd337f73 (patch) | |
tree | d06c3c6e2cd699f1b1682b5af7f8e054f69b4e89 /src/compiler/glsl/linker.cpp | |
parent | aead6a1e947af84b0af2853c204d5cad6d92bfff (diff) |
glsl: Create and use a new ir_variable::count_attribute_slots() wrapper.
This wraps glsl_type::count_attribute_slots(), but will soon contain a
couple of overrides for a couple of GLSL built-ins variables.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index d4a484fdea0..ef2b01e17d7 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -2670,7 +2670,7 @@ assign_attribute_or_color_locations(void *mem_ctx, return false; } - const unsigned slots = var->type->count_attribute_slots(target_index == MESA_SHADER_VERTEX); + const unsigned slots = var->count_attribute_slots(target_index == MESA_SHADER_VERTEX); /* If the variable is not a built-in and has a location statically * assigned in the shader (presumably via a layout qualifier), make sure @@ -2782,7 +2782,7 @@ assign_attribute_or_color_locations(void *mem_ctx, */ for (unsigned i = 0; i < assigned_attr; i++) { unsigned assigned_slots = - assigned[i]->type->count_attribute_slots(false); + assigned[i]->count_attribute_slots(false); unsigned assig_attr = assigned[i]->data.location - generic_base; unsigned assigned_use_mask = (1 << assigned_slots) - 1; @@ -3233,7 +3233,7 @@ check_image_resources(struct gl_context *ctx, struct gl_shader_program *prog) ir_variable *var = node->as_variable(); if (var && var->data.mode == ir_var_shader_out) /* since there are no double fs outputs - pass false */ - fragment_outputs += var->type->count_attribute_slots(false); + fragment_outputs += var->count_attribute_slots(false); } } } |