mesa: remove obsolete matrix comment
[mesa.git] / src / glsl / ir_uniform.h
index be9f6b254378c0f318c6d45f553b6639f409e453..913c5377359d4a831c47d54fce5ee5953eb3d449 100644 (file)
 #ifndef IR_UNIFORM_H
 #define IR_UNIFORM_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
 
 /* stdbool.h is necessary because this file is included in both C and C++ code.
  */
 #include <stdbool.h>
+
 #include "program/prog_parameter.h"  /* For union gl_constant_value. */
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 enum gl_uniform_driver_format {
    uniform_native = 0,          /**< Store data in the native format. */
    uniform_int_float,           /**< Store integer data as floats. */
@@ -116,6 +119,40 @@ struct gl_uniform_storage {
     * uniform if the \c ::driver_storage interface is not used.
     */
    union gl_constant_value *storage;
+
+   /** Fields for GL_ARB_uniform_buffer_object
+    * @{
+    */
+
+   /**
+    * GL_UNIFORM_BLOCK_INDEX: index of the uniform block containing
+    * the uniform, or -1 for the default uniform block.  Note that the
+    * index is into the linked program's UniformBlocks[] array, not
+    * the linked shader's.
+    */
+   int block_index;
+
+   /** GL_UNIFORM_OFFSET: byte offset within the uniform block, or -1. */
+   int offset;
+
+   /**
+    * GL_UNIFORM_MATRIX_STRIDE: byte stride between columns or rows of
+    * a matrix.  Set to 0 for non-matrices in UBOs, or -1 for uniforms
+    * in the default uniform block.
+    */
+   int matrix_stride;
+
+   /**
+    * GL_UNIFORM_ARRAY_STRIDE: byte stride between elements of the
+    * array.  Set to zero for non-arrays in UBOs, or -1 for uniforms
+    * in the default uniform block.
+    */
+   int array_stride;
+
+   /** GL_UNIFORM_ROW_MAJOR: true iff it's a row-major matrix in a UBO */
+   bool row_major;
+
+   /** @} */
 };
 
 #ifdef __cplusplus