i965: Reduce gl_MaxGeometryInputComponents to 64.
i965: Reduce gl_MaxGeometryInputComponents to 64.

Although in principle there is no hardware limitation that prevents
gl_MaxGeometryInputComponents from being set to 128 on Gen7, we have
the following limitations in the vec4 compiler back end:

- Registers assigned to geometry shader inputs can't be spilled or
  later re-used for any other purpose.

- The last 16 registers are set aside for the "MRF hack", meaning they
  can only be used to send messages, and not for general purpose
  computation.

- Up to 32 registers may be reserved for push constants, even if there
  is sufficient register pressure to make this impractical.

A shader using 128 geometry input components, and having an input type
of triangles_adjacency, would use up:

- 1 register for r0 (which holds URB handles and various pieces of
  control information).

- 1 register for gl_PrimitiveID.

- 102 registers for geometry shader inputs (17 registers per input
  vertex, assuming DUAL_INSTANCED dispatch mode and allowing for one
  register of overhead for gl_Position and gl_PointSize, which are
  present in the URB map even if they are not used).

- Up to 32 registers for push constants.

- 16 registers for the "MRF hack".

That's a total of 152 registers, which is well over the 128 registers
the hardware supports.

Fortunately, the GLSL 1.50 spec allows us to reduce
gl_MaxGeometryInputComponents to 64.  Doing that frees up 48
registers, brining the total down to 104 registers, leaving 24
registers available to do computation.

Fixes piglit test
spec/glsl-1.50/execution/geometry/max-input-components.

Reviewed-by: Eric Anholt <96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@anholt.net>
Reviewed-by: Kenneth Graunke <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>
Reviewed-by: Ian Romanick <2b237cafb16dc45038e85df6c85e74e6d899eba9@intel.com>
Reviewed-by: Matt Turner <789b315743a28dd066a4ba1459c35951c291d8a6@gmail.com>

tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,jbarczak/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,metora/MesaGLSLCompiler,djreep81/glsl-optimizer,mapbox/glsl-optimizer,jbarczak/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,dellis1972/glsl-optimizer,bkaradzic/glsl-optimizer,bkaradzic/glsl-optimizer,dellis1972/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,bkaradzic/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,zeux/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer