diff options
author | Eric Anholt <[email protected]> | 2012-04-27 13:52:56 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-07-20 10:43:28 -0700 |
commit | f609cf782ab5e90ddf045dc4b0da8cebf99be0d1 (patch) | |
tree | 7f54da76e408a733a9bb82e8242ada78fb6063f4 /src/mesa/program | |
parent | b3c093c79c2ec49c36af37aa290d5ae452149f6e (diff) |
glsl: Merge the lists of uniform blocks into the linked shader program.
This attempts error-checking, but the layout isn't done yet.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 8a4f31162e1..baa317204c4 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -3115,6 +3115,12 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader) } } + if (shader->UniformBlocks) + ralloc_free(shader->UniformBlocks); + shader->NumUniformBlocks = state->num_uniform_blocks; + shader->UniformBlocks = state->uniform_blocks; + ralloc_steal(shader, shader->UniformBlocks); + /* Retain any live IR, but trash the rest. */ reparent_ir(shader->ir, shader->ir); |