diff options
author | Eric Anholt <[email protected]> | 2012-04-26 18:21:43 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-07-20 10:43:19 -0700 |
commit | b3c093c79c2ec49c36af37aa290d5ae452149f6e (patch) | |
tree | fc55744beeeb712309595a5302995b3a17f67856 /src/glsl/ir.h | |
parent | f7561e8ecd80e915150ca63c0c79a5f9839c8e12 (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/glsl/ir.h')
-rw-r--r-- | src/glsl/ir.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 9bbf3b7efae..8506f604058 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -453,7 +453,8 @@ public: * - Vertex shader output: one of the values from \c gl_vert_result. * - Fragment shader input: one of the values from \c gl_frag_attrib. * - Fragment shader output: one of the values from \c gl_frag_result. - * - Uniforms: Per-stage uniform slot number. + * - Uniforms: Per-stage uniform slot number for default uniform block. + * - Uniforms: Index within the uniform block definition for UBO members. * - Other: This field is not currently used. * * If the variable is a uniform, shader input, or shader output, and the @@ -462,6 +463,16 @@ public: int location; /** + * Uniform block number for uniforms. + * + * This index is into the shader's list of uniform blocks, not the + * linked program's merged list. + * + * If the variable is not in a uniform block, the value will be -1. + */ + int uniform_block; + + /** * output index for dual source blending. */ int index; |