glsl: Don't lower indexing with gl_InvocationID in the TCS 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
glsl: make gl_PatchVerticesIn a system value

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
glsl: Require tess input/output blocks to be arrays
glsl: pass shader stage to lower_output_reads and handle tess control

Tessellation control outputs can be read in directly without first
having been written. Accessing these will require some special logic
anyways, so just let them through.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
glsl: Support patch variables in ir_set_program_inouts
glsl: Push vertex count determination down one level

We have the prog here, so we don't need the caller to work this out for
us.