summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorFabian Bieler <[email protected]>2014-03-20 22:41:40 +0100
committerMarek Olšák <[email protected]>2015-07-23 00:59:26 +0200
commit1036b024d4c8ce2376ac41219dfda01d5a59b3ef (patch)
treeda4b0962904769b9c904604689e4527e17036f23 /src/mesa
parent497eb295838baccde1420adfcc4ef7e8fdddd774 (diff)
glsl: add tessellation shader defines and built-in variables.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h6
-rw-r--r--src/mesa/program/prog_print.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 12390c430e6..3244a95c32b 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -240,6 +240,8 @@ typedef enum
VARYING_SLOT_VIEWPORT, /* Appears as VS or GS output */
VARYING_SLOT_FACE, /* FS only */
VARYING_SLOT_PNTC, /* FS only */
+ VARYING_SLOT_TESS_LEVEL_OUTER, /* Only appears as TCS output. */
+ VARYING_SLOT_TESS_LEVEL_INNER, /* Only appears as TCS output. */
VARYING_SLOT_VAR0, /* First generic varying slot */
VARYING_SLOT_MAX = VARYING_SLOT_VAR0 + MAX_VARYING
} gl_varying_slot;
@@ -276,6 +278,8 @@ typedef enum
#define VARYING_BIT_VIEWPORT BITFIELD64_BIT(VARYING_SLOT_VIEWPORT)
#define VARYING_BIT_FACE BITFIELD64_BIT(VARYING_SLOT_FACE)
#define VARYING_BIT_PNTC BITFIELD64_BIT(VARYING_SLOT_PNTC)
+#define VARYING_BIT_TESS_LEVEL_OUTER BITFIELD64_BIT(VARYING_SLOT_TESS_LEVEL_OUTER)
+#define VARYING_BIT_TESS_LEVEL_INNER BITFIELD64_BIT(VARYING_SLOT_TESS_LEVEL_INNER)
#define VARYING_BIT_VAR(V) BITFIELD64_BIT(VARYING_SLOT_VAR0 + (V))
/*@}*/
@@ -292,6 +296,8 @@ _mesa_varying_slot_in_fs(gl_varying_slot slot)
case VARYING_SLOT_EDGE:
case VARYING_SLOT_CLIP_VERTEX:
case VARYING_SLOT_LAYER:
+ case VARYING_SLOT_TESS_LEVEL_OUTER:
+ case VARYING_SLOT_TESS_LEVEL_INNER:
return GL_FALSE;
default:
return GL_TRUE;
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index 336a5ef4448..bb7c2c6e527 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -147,6 +147,8 @@ arb_input_attrib_string(GLuint index, GLenum progType)
"fragment.(twenty-one)", /* VARYING_SLOT_VIEWPORT */
"fragment.(twenty-two)", /* VARYING_SLOT_FACE */
"fragment.(twenty-three)", /* VARYING_SLOT_PNTC */
+ "fragment.(twenty-four)", /* VARYING_SLOT_TESS_LEVEL_OUTER */
+ "fragment.(twenty-five)", /* VARYING_SLOT_TESS_LEVEL_INNER */
"fragment.varying[0]",
"fragment.varying[1]",
"fragment.varying[2]",
@@ -272,6 +274,8 @@ arb_output_attrib_string(GLuint index, GLenum progType)
"result.(twenty-one)", /* VARYING_SLOT_VIEWPORT */
"result.(twenty-two)", /* VARYING_SLOT_FACE */
"result.(twenty-three)", /* VARYING_SLOT_PNTC */
+ "result.(twenty-four)", /* VARYING_SLOT_TESS_LEVEL_OUTER */
+ "result.(twenty-five)", /* VARYING_SLOT_TESS_LEVEL_INNER */
"result.varying[0]",
"result.varying[1]",
"result.varying[2]",