mesa: add system value for gl_PatchVerticesIn

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
glsl: make gl_PatchVerticesIn a system value

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gallium: add tessellation shader types

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gallium: add new PATCHES primitive type

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gallium: add new semantics for tessellation

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gallium: add VERTICESIN semantic

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gallium: add interfaces for controlling tess program state

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gallium: add tessellation shader properties

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gallium: add patch_vertices to draw info

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gallium: add set_tess_state to configure default tessellation parameters

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0: preliminary tess support

Uncomment the various functionality that was already there and add in
obvious missing bits that parallel vp/gp/fp functionality.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0: TESSCOORD comes in as a sysval, not an input

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50/ir: mark varyings as per-patch based on semantic name

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50/ir: populate info structure based on new tess properties

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50/ir: set perPatch flag on load/stores to per-patch varyings

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0: add handling for set_tess_state callback

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50/ir: add support for reading outputs in tess control shaders

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0: add support for PATCH semantics

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gm107/ir: add lane/vertex count sysvals

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
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>