mesa: Add varying slot for viewport index
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 5 Nov 2013 20:18:43 +0000 (12:18 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 20 Jan 2014 19:32:00 +0000 (11:32 -0800)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/mtypes.h
src/mesa/program/prog_print.c

index cac0206151677fe9526e93a4d72517b703540597..25821324ccaba767037e80f1772314827bd35e45 100644 (file)
@@ -235,6 +235,7 @@ typedef enum
    VARYING_SLOT_CLIP_DIST1,
    VARYING_SLOT_PRIMITIVE_ID, /* Does not appear in VS */
    VARYING_SLOT_LAYER, /* Appears as VS or GS output */
+   VARYING_SLOT_VIEWPORT, /* Appears as VS or GS output */
    VARYING_SLOT_FACE, /* FS only */
    VARYING_SLOT_PNTC, /* FS only */
    VARYING_SLOT_VAR0, /* First generic varying slot */
@@ -270,6 +271,7 @@ typedef enum
 #define VARYING_BIT_CLIP_DIST1 BITFIELD64_BIT(VARYING_SLOT_CLIP_DIST1)
 #define VARYING_BIT_PRIMITIVE_ID BITFIELD64_BIT(VARYING_SLOT_PRIMITIVE_ID)
 #define VARYING_BIT_LAYER BITFIELD64_BIT(VARYING_SLOT_LAYER)
+#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_VAR(V) BITFIELD64_BIT(VARYING_SLOT_VAR0 + (V))
index 9391e99ff62e7eb11ab7977656c395d456f6159e..02ba01eca7b4ff35e929ac452f13f574f81538ec 100644 (file)
@@ -144,8 +144,9 @@ arb_input_attrib_string(GLint index, GLenum progType)
       "fragment.(eighteen)", /* VARYING_SLOT_CLIP_DIST1 */
       "fragment.(nineteen)", /* VARYING_SLOT_PRIMITIVE_ID */
       "fragment.(twenty)", /* VARYING_SLOT_LAYER */
-      "fragment.(twenty-one)", /* VARYING_SLOT_FACE */
-      "fragment.(twenty-two)", /* VARYING_SLOT_PNTC */
+      "fragment.(twenty-one)", /* VARYING_SLOT_VIEWPORT */
+      "fragment.(twenty-two)", /* VARYING_SLOT_FACE */
+      "fragment.(twenty-three)", /* VARYING_SLOT_PNTC */
       "fragment.varying[0]",
       "fragment.varying[1]",
       "fragment.varying[2]",
@@ -268,8 +269,9 @@ arb_output_attrib_string(GLint index, GLenum progType)
       "result.(eighteen)", /* VARYING_SLOT_CLIP_DIST1 */
       "result.(nineteen)", /* VARYING_SLOT_PRIMITIVE_ID */
       "result.(twenty)", /* VARYING_SLOT_LAYER */
-      "result.(twenty-one)", /* VARYING_SLOT_FACE */
-      "result.(twenty-two)", /* VARYING_SLOT_PNTC */
+      "result.(twenty-one)", /* VARYING_SLOT_VIEWPORT */
+      "result.(twenty-two)", /* VARYING_SLOT_FACE */
+      "result.(twenty-three)", /* VARYING_SLOT_PNTC */
       "result.varying[0]",
       "result.varying[1]",
       "result.varying[2]",