WIP: make the state atom for compiling Gen7 geometry shaders.  TODO: maybe disentangle
!UPSTREAM: i965: Fix some vec4 gs key setup

TODO:
- Test thoroughly
- Squash
!UPSTREAM: Generalize some error messages for GS.

TODO: find more places to generalize.
TODO: Don't use "VS/GS" terminology.  Use "vec4" terminology, since that will endure longer.
i965/gs(gen7): Allocate URB space for use by geometry shader
!UPSTREAM: i965/gs(gen7): Allocate push constant space
i965/vs: generalize push const upload in preparation for GS
i965/gs: set up GS state
!UPSTREAM: turn on GS

TODO:
- Commit message
!UPSTREAM: write out cut bits

Stuff that needs fixing:
- Not yet configuring 3DSTATE_GS to indicate that cut bits are present
- Not handling >31 output vertices correctly
- Probably should pack vertex_count and cut_bits into a single register
- Code should be conditioned on whether the shader uses EndPrimitive()
- At end of thread, shouldn't do the write if vertex_count is a multiple of 32
- At end of thread, should write to the appropriate DWORD
- At EmitVertex time, should write cut bits if vertex_counter%32 == 31
!UPSTREAM: vbo: Update vbo_count_tessellated_primitives for new primitive types.

TODO: test.
!UPSTREAM: i965: Add new primitive types.

TODO: test.
!UPSTREAM: Debug optimization passes
glsl: Include EmitVertex() and EndPrimitive() prototypes for GLSL 1.50 GS.

They'd been added to ARB_gs4, but they're used the same way in 1.50.
glsl: !UPSTREAM: Spam in builtin 1.30 variables for 1.50 GSes.

They're supposed to be moved into interface blocks, but I haven't figured
out how to wire that up yet.  At least I can compile geometry-basic now.
glsl: Make sure that we don't put too many bitfields in ast_type_qualifier.

We do some tests of qualifiersusing a union containing an int and the
struct full of bitfields, so make sure the bitfields don't spill outside
the int.
glsl: Parse the GLSL 1.50 GS layout qualifiers.

Limited semantic checking (compatibility between declarations, checking
that they're in the right shader target, etc.) is done.

v2: Remove stray debug printfs.
glsl: Export the compiler's GS layout qualifiers to the gl_shader.

Next step is to validate them at link time.
glsl: Cross-validate GS layout qualifiers while intrastage linking.

This gets piglit's geometry-basic test running.

TODO: Still need to validate that the GS layout qualifiers don't get used
in places they shouldn't (like an interface block, or a particular shader
input or output)
i965/gs: Support UBOs by generating surface state and binding tables.

All but two of the piglit GLSL 1.50/uniform_buffer tests work, and
maxuniformblocksize and referenced-by-shader work.
!UPSTREAM: Expose GLSL 1.50 and GL 3.2 core contexts.

This lets me run tests normally, since globally doing GL version override
can break tests that require a compatibility context.

TODO:
- Untangle.