/**
- * Program instruction opcodes, for both vertex and fragment programs.
- * \note changes to this opcode list must be reflected in t_vb_arbprogram.c
+ * Program instruction opcodes for vertex, fragment and geometry programs.
*/
typedef enum prog_opcode {
/* ARB_vp ARB_fp NV_vp NV_fp GLSL */
OPCODE_DPH, /* X X 1.1 */
OPCODE_DST, /* X X X X */
OPCODE_ELSE, /* X */
- OPCODE_EMIT_VERTEX, /* X */
+ OPCODE_EMIT_VERTEX,/* X */
OPCODE_END, /* X X X X opt */
- OPCODE_END_PRIMITIVE,/* X */
+ OPCODE_END_PRIMITIVE,/* X */
OPCODE_ENDIF, /* opt */
OPCODE_ENDLOOP, /* opt */
OPCODE_ENDSUB, /* opt */
* instruction which allows per-component negation.
*/
GLuint Negate:4;
+
+ /**
+ * Is the register two-dimensional.
+ * Two dimensional registers are of the
+ * REGISTER[index][index2] format.
+ * They are used by the geometry shaders where
+ * the first index is the index within an array
+ * and the second index is the semantic of the
+ * array, e.g. gl_PositionIn[index] would become
+ * INPUT[index][gl_PositionIn]
+ */
+ GLuint HasIndex2:1;
+ GLuint RelAddr2:1;
+ GLint Index2:(INST_INDEX_BITS+1); /**< Extra bit here for sign bit.
+ * May be negative for relative
+ * addressing. */
};