glsl: Add link_uniform_blocks to calculate all UBO data at link-time

Calculate all of the block member offsets, the IndexNames, and
everything else to do with every UBO.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Ian Romanick
2013-01-22 00:59:56 -05:00
parent 681df909e3
commit 0ab7399822
2 changed files with 255 additions and 0 deletions

View File

@@ -53,6 +53,13 @@ extern bool
link_uniform_blocks_are_compatible(const gl_uniform_block *a,
const gl_uniform_block *b);
extern int
link_uniform_blocks(void *mem_ctx,
struct gl_shader_program *prog,
struct gl_shader **shader_list,
unsigned num_shaders,
struct gl_uniform_block **blocks_ret);
/**
* Class for processing all of the leaf fields of an uniform
*