aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_uniform.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-05-01 13:59:31 -0700
committerEric Anholt <[email protected]>2012-07-20 10:43:47 -0700
commita74507dc94f6383f2a81850866fceec108c2ab34 (patch)
tree1b30100adb040ad5c61cdbec324c32811d891f29 /src/glsl/ir_uniform.h
parentddc88fbf510ee8ba35b974cc21c595e96d115cc8 (diff)
glsl: Propagate uniform block information into gl_uniform_storage.
Now we can actually return information on uniforms in uniform blocks in the new queries. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ir_uniform.h')
-rw-r--r--src/glsl/ir_uniform.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/glsl/ir_uniform.h b/src/glsl/ir_uniform.h
index 225da3fc5ef..913c5377359 100644
--- a/src/glsl/ir_uniform.h
+++ b/src/glsl/ir_uniform.h
@@ -119,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