*
* When this enum is updated, the following code must be updated too:
* - vertResults (in prog_print.c's arb_output_attrib_string())
+ * - fragAttribs (in prog_print.c's arb_input_attrib_string())
* - _mesa_vert_result_to_frag_attrib()
* - _mesa_frag_attrib_to_vert_result()
*/
*/
typedef enum
{
- FRAG_ATTRIB_WPOS = 0,
- FRAG_ATTRIB_COL0 = 1,
- FRAG_ATTRIB_COL1 = 2,
- FRAG_ATTRIB_FOGC = 3,
- FRAG_ATTRIB_TEX0 = 4,
- FRAG_ATTRIB_TEX1 = 5,
- FRAG_ATTRIB_TEX2 = 6,
- FRAG_ATTRIB_TEX3 = 7,
- FRAG_ATTRIB_TEX4 = 8,
- FRAG_ATTRIB_TEX5 = 9,
- FRAG_ATTRIB_TEX6 = 10,
- FRAG_ATTRIB_TEX7 = 11,
- FRAG_ATTRIB_FACE = 12, /**< front/back face */
- FRAG_ATTRIB_PNTC = 13, /**< sprite/point coord */
- FRAG_ATTRIB_CLIP_DIST0 = 14,
- FRAG_ATTRIB_CLIP_DIST1 = 15,
- FRAG_ATTRIB_VAR0 = 16, /**< shader varying */
- FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING)
+ FRAG_ATTRIB_WPOS = VARYING_SLOT_POS,
+ FRAG_ATTRIB_COL0 = VARYING_SLOT_COL0,
+ FRAG_ATTRIB_COL1 = VARYING_SLOT_COL1,
+ FRAG_ATTRIB_FOGC = VARYING_SLOT_FOGC,
+ FRAG_ATTRIB_TEX0 = VARYING_SLOT_TEX0,
+ FRAG_ATTRIB_TEX1 = VARYING_SLOT_TEX1,
+ FRAG_ATTRIB_TEX2 = VARYING_SLOT_TEX2,
+ FRAG_ATTRIB_TEX3 = VARYING_SLOT_TEX3,
+ FRAG_ATTRIB_TEX4 = VARYING_SLOT_TEX4,
+ FRAG_ATTRIB_TEX5 = VARYING_SLOT_TEX5,
+ FRAG_ATTRIB_TEX6 = VARYING_SLOT_TEX6,
+ FRAG_ATTRIB_TEX7 = VARYING_SLOT_TEX7,
+ FRAG_ATTRIB_FACE = VARYING_SLOT_FACE, /**< front/back face */
+ FRAG_ATTRIB_PNTC = VARYING_SLOT_PNTC, /**< sprite/point coord */
+ FRAG_ATTRIB_CLIP_DIST0 = VARYING_SLOT_CLIP_DIST0,
+ FRAG_ATTRIB_CLIP_DIST1 = VARYING_SLOT_CLIP_DIST1,
+ FRAG_ATTRIB_VAR0 = VARYING_SLOT_VAR0, /**< shader varying */
+ FRAG_ATTRIB_MAX = VARYING_SLOT_MAX
} gl_frag_attrib;
else if (vert_result < VARYING_SLOT_CLIP_DIST0)
return -1;
else if (vert_result <= VARYING_SLOT_CLIP_DIST1)
- return vert_result - VARYING_SLOT_CLIP_DIST0 + FRAG_ATTRIB_CLIP_DIST0;
+ return vert_result;
else if (vert_result < VARYING_SLOT_VAR0)
return -1;
else
- return vert_result - VARYING_SLOT_VAR0 + FRAG_ATTRIB_VAR0;
+ return vert_result;
}
else if (frag_attrib < FRAG_ATTRIB_CLIP_DIST0)
return -1;
else if (frag_attrib <= FRAG_ATTRIB_CLIP_DIST1)
- return frag_attrib - FRAG_ATTRIB_CLIP_DIST0 + VARYING_SLOT_CLIP_DIST0;
+ return frag_attrib;
else /* frag_attrib >= FRAG_ATTRIB_VAR0 */
- return frag_attrib - FRAG_ATTRIB_VAR0 + VARYING_SLOT_VAR0;
+ return frag_attrib;
}
"fragment.texcoord[5]",
"fragment.texcoord[6]",
"fragment.texcoord[7]",
- "fragment.(twelve)", /* FRAG_ATTRIB_FACE */
- "fragment.(thirteen)", /* FRAG_ATTRIB_PNTC */
- "fragment.(fourteen)", /* FRAG_ATTRIB_CLIP_DIST0 */
- "fragment.(fifteen)", /* FRAG_ATTRIB_CLIP_DIST1 */
+ "fragment.(twelve)", /* VARYING_SLOT_PSIZ */
+ "fragment.(thirteen)", /* VARYING_SLOT_BFC0 */
+ "fragment.(fourteen)", /* VARYING_SLOT_BFC1 */
+ "fragment.(fifteen)", /* VARYING_SLOT_EDGE */
+ "fragment.(sixteen)", /* VARYING_SLOT_CLIP_VERTEX */
+ "fragment.(seventeen)", /* FRAG_ATTRIB_CLIP_DIST0 */
+ "fragment.(eighteen)", /* FRAG_ATTRIB_CLIP_DIST1 */
+ "fragment.(nineteen)", /* VARYING_SLOT_PRIMITIVE_ID */
+ "fragment.(twenty)", /* VARYING_SLOT_LAYER */
+ "fragment.(twenty-one)", /* FRAG_ATTRIB_FACE */
+ "fragment.(twenty-two)", /* FRAG_ATTRIB_PNTC */
"fragment.varying[0]",
"fragment.varying[1]",
"fragment.varying[2]",