Move count_attribute_slots() out of the linker and into glsl_type.
authorPaul Berry <stereotype441@gmail.com>
Wed, 31 Jul 2013 15:15:08 +0000 (08:15 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 2 Aug 2013 03:19:02 +0000 (20:19 -0700)
commit0026ad4994ca88a6cdd4e5ef4098469ab57bdcc1
treeb3ea77af8a0ae4c5a9482b3fe0b386b53ec4aa01
parent906eff09e374c75b0486011b73b7048f6070456e
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>
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h
src/glsl/link_varyings.cpp
src/glsl/linker.cpp
src/glsl/linker.h