aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-04-26 18:21:43 -0700
committerEric Anholt <[email protected]>2012-07-20 10:43:19 -0700
commitb3c093c79c2ec49c36af37aa290d5ae452149f6e (patch)
treefc55744beeeb712309595a5302995b3a17f67856 /src/mesa
parentf7561e8ecd80e915150ca63c0c79a5f9839c8e12 (diff)
glsl: Translate the AST for uniform blocks into some IR structures.
We're going to need this structure to cross-validate the uniform blocks between shader stages, since unused ir_variables might get dropped. It's also the place we store the RowMajor qualifier, which is not part of the GLSL type (since that would cause a bunch of type equality checks to fail). Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 4769e106631..b39a8dcd75b 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2237,6 +2237,24 @@ typedef enum
MESA_SHADER_TYPES = 3
} gl_shader_type;
+struct gl_uniform_buffer_variable
+{
+ char *Name;
+ const struct glsl_type *Type;
+ unsigned int Buffer;
+ unsigned int Offset;
+ GLboolean RowMajor;
+};
+
+struct gl_uniform_block
+{
+ /** Declared name of the uniform block */
+ char *Name;
+
+ /** Array of supplemental information about UBO ir_variables. */
+ struct gl_uniform_buffer_variable *Uniforms;
+ GLuint NumUniforms;
+};
/**
* A GLSL program object.