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 <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
This commit is contained in:
Kenneth Graunke
2015-11-15 04:32:52 -08:00
parent aead6a1e94
commit 6aa5cb34d0
5 changed files with 17 additions and 11 deletions

View File

@@ -2301,7 +2301,7 @@ check_against_output_limit(struct gl_context *ctx,
var->data.mode == ir_var_shader_out &&
var_counts_against_varying_limit(producer->Stage, var)) {
/* outputs for fragment shader can't be doubles */
output_vectors += var->type->count_attribute_slots(false);
output_vectors += var->count_attribute_slots(false);
}
}
@@ -2345,7 +2345,7 @@ check_against_input_limit(struct gl_context *ctx,
var->data.mode == ir_var_shader_in &&
var_counts_against_varying_limit(consumer->Stage, var)) {
/* vertex inputs aren't varying counted */
input_vectors += var->type->count_attribute_slots(false);
input_vectors += var->count_attribute_slots(false);
}
}