glsl: keep track of which inputs/outputs are per-patch
glsl: Add "In" or "Out" suffix to name when flattening interface blocks.

This is to prevent a name conflict in tessellation shaders built-in interface
blocks.
glsl: Add builtin uniforms for default inner/outer tess levels

If the hardware needs to always have a control shader present if
and evaluation shader is present, then the control shader will need
these values.
glsl: Attach pass-through tessellation control shader if needed.

When no tessellation control shader is present but a tessellation evaluation
shader is, attach pass-through tessellation control shader that reads
tessellation levels from uniform values.

V2 [Chris]: Fix rebase issues.
glsl: Make stand-alone compiler work with tessellation shaders.
glsl: HACK: don't lower gl_InvocationID to cond assign.
glsl: Remove linker error in case of unknown gl_in/gl_out index

The spec says that behavior is undefined in this case. Unfortunately, we
were hitting the linker error in all kinds of reasonable (and
well-defined) shaders where the index was not a compile-time constant,
so was assumed to be as high as MAX_PATCH_VERTICES

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
glsl: Remove link-time requirement for TES to be present if TCS is

This will get in the way of ARB_sso support, and is nonconformant. The
ARB_tessellation_shader spec says an error is generated at draw time.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
glsl: record that we are using passthrough HS
shaderapi: Passthrough doesn't count as a TCS for error generation.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
glsl: relax unsized input/output block arrays for TCS/TES
probably junk: fix error gen
glsl: Add missing newlines to various resource limit errors

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
glsl: Allow nonconst indexing of arrays where we can work out an implicit size

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
glsl: Add builtin constants for ARB_tessellation_shader
glsl: more implicit sizing probably junk
glsl: Fix linking of VS outputs to TCS inputs

In the TCS, these are all arrays, just like GS inputs.
glsl: Restrict indexing for writes to TCS outputs to gl_InvocationID

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
glsl: properly size unsized arrays in tess stages
mesa: add system value for gl_PatchVerticesIn

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>

Conflicts:
	src/mesa/main/mtypes.h