Move count_attribute_slots() out of the linker and into glsl_type.
Our previous justification for leaving this function out of glsl_type was that it implemented counting rules that were specific to GLSL 1.50. However, these counting rules also describe the number of varying slots that Mesa will assign to a varying in the absence of varying packing. That's useful to be able to compute from outside of the linker code (a future patch will use it from ir_set_program_inouts.cpp). So go ahead and move it to glsl_type. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -1164,7 +1164,7 @@ check_against_varying_limit(struct gl_context *ctx,
|
||||
/* The packing rules used for vertex shader inputs are also
|
||||
* used for fragment shader inputs.
|
||||
*/
|
||||
varying_vectors += count_attribute_slots(var->type);
|
||||
varying_vectors += var->type->count_attribute_slots();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user