nir: Add intrinsics for tessellation shader system values.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 9 Oct 2015 06:53:47 +0000 (23:53 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 29 Oct 2015 04:14:53 +0000 (21:14 -0700)
commit9c8208f2c15445b00ba170ff96a9ea4ce6c083e1
tree4f68369b4fcff13a46f65e950f1f160e0a1a924a
parentbf05af3f0e8769f417bbd995470dc1b8083a0df9
nir: Add intrinsics for tessellation shader system values.

nir_intrinsic_load_patch_vertices_in corresponds to gl_PatchVerticesIn,
a special input in both the TCS and TES stages.

nir_intrinsic_load_tess_coord corresponds to gl_TessCoord, a special
tessellation evaluation shader input.

nir_intrinsic_load_tess_level_outer/inner correspond to the
gl_TessLevelOuter[] and gl_TessLevelInner[] evaluation shader inputs,
which we treat as system values because they're stored specially.
(These intrinsics are only for the TES - the TCS uses output variables.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/glsl/nir/nir.c
src/glsl/nir/nir_intrinsics.h