From b3c093c79c2ec49c36af37aa290d5ae452149f6e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 26 Apr 2012 18:21:43 -0700 Subject: 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 --- src/mesa/main/mtypes.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mesa/main') 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. -- cgit v1.2.3