+struct gl_transform_feedback_varying_info
+{
+ char *Name;
+ GLenum Type;
+ GLint Size;
+};
+
+
+/**
+ * Per-output info vertex shaders for transform feedback.
+ */
+struct gl_transform_feedback_output
+{
+ unsigned OutputRegister;
+ unsigned OutputBuffer;
+ unsigned NumComponents;
+
+ /** offset (in DWORDs) of this output within the interleaved structure */
+ unsigned DstOffset;
+
+ /**
+ * Offset into the output register of the data to output. For example,
+ * if NumComponents is 2 and ComponentOffset is 1, then the data to
+ * offset is in the y and z components of the output register.
+ */
+ unsigned ComponentOffset;
+};
+
+
+/** Post-link transform feedback info. */
+struct gl_transform_feedback_info
+{
+ unsigned NumOutputs;
+
+ /**
+ * Number of transform feedback buffers in use by this program.
+ */
+ unsigned NumBuffers;
+
+ struct gl_transform_feedback_output *Outputs;
+
+ /** Transform feedback varyings used for the linking of this shader program.
+ *
+ * Use for glGetTransformFeedbackVarying().
+ */
+ struct gl_transform_feedback_varying_info *Varyings;
+ GLint NumVarying;
+
+ /**
+ * Total number of components stored in each buffer. This may be used by
+ * hardware back-ends to determine the correct stride when interleaving
+ * multiple transform feedback outputs in the same buffer.
+ */
+ unsigned BufferStride[MAX_FEEDBACK_BUFFERS];
+};
+
+
+/**
+ * Transform feedback object state
+ */
+struct gl_transform_feedback_object
+{
+ GLuint Name; /**< AKA the object ID */
+ GLint RefCount;
+ GLboolean Active; /**< Is transform feedback enabled? */
+ GLboolean Paused; /**< Is transform feedback paused? */
+ GLboolean EndedAnytime; /**< Has EndTransformFeedback been called
+ at least once? */
+
+ /** The feedback buffers */
+ GLuint BufferNames[MAX_FEEDBACK_BUFFERS];
+ struct gl_buffer_object *Buffers[MAX_FEEDBACK_BUFFERS];
+
+ /** Start of feedback data in dest buffer */
+ GLintptr Offset[MAX_FEEDBACK_BUFFERS];
+ /** Max data to put into dest buffer (in bytes) */
+ GLsizeiptr Size[MAX_FEEDBACK_BUFFERS];
+};
+
+
+/**
+ * Context state for transform feedback.
+ */
+struct gl_transform_feedback_state
+{
+ GLenum Mode; /**< GL_POINTS, GL_LINES or GL_TRIANGLES */
+
+ /** The general binding point (GL_TRANSFORM_FEEDBACK_BUFFER) */
+ struct gl_buffer_object *CurrentBuffer;
+
+ /** The table of all transform feedback objects */
+ struct _mesa_HashTable *Objects;
+
+ /** The current xform-fb object (GL_TRANSFORM_FEEDBACK_BINDING) */
+ struct gl_transform_feedback_object *CurrentObject;
+
+ /** The default xform-fb object (Name==0) */
+ struct gl_transform_feedback_object *DefaultObject;
+};
+
+