diff options
author | Timothy Arceri <[email protected]> | 2016-11-05 08:55:57 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-06 11:21:41 +1100 |
commit | 0e7eec1ab5f27ced1aa4b2d77c2c63512d299694 (patch) | |
tree | 1cf0ae90e08fd5c0f177a773a62a74c39545223d /src/compiler/glsl/linker.cpp | |
parent | b792c3897927c1d89968bc0040faef02ec976184 (diff) |
st/mesa/glsl/i965: move per stage UniformBlocks to gl_program
This will help allow us to store pointers to gl_program structs in the
CurrentProgram array resulting in a bunch of code simplifications.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 332b799145c..c4e221ee369 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -1162,7 +1162,7 @@ interstage_cross_validate_uniform_blocks(struct gl_shader_program *prog, sh_blks = sh->ShaderStorageBlocks; } else { sh_num_blocks = prog->_LinkedShaders[i]->Program->info.num_ubos; - sh_blks = sh->UniformBlocks; + sh_blks = sh->Program->sh.UniformBlocks; } for (unsigned int j = 0; j < sh_num_blocks; j++) { @@ -1194,7 +1194,7 @@ interstage_cross_validate_uniform_blocks(struct gl_shader_program *prog, struct gl_linked_shader *sh = prog->_LinkedShaders[i]; struct gl_uniform_block **sh_blks = validate_ssbo ? - sh->ShaderStorageBlocks : sh->UniformBlocks; + sh->ShaderStorageBlocks : sh->Program->sh.UniformBlocks; blks[j].stageref |= sh_blks[stage_index]->stageref; sh_blks[stage_index] = &blks[j]; @@ -2272,11 +2272,11 @@ link_intrastage_shaders(void *mem_ctx, } /* Copy ubo blocks to linked shader list */ - linked->UniformBlocks = + linked->Program->sh.UniformBlocks = ralloc_array(linked, gl_uniform_block *, num_ubo_blocks); ralloc_steal(linked, ubo_blocks); for (unsigned i = 0; i < num_ubo_blocks; i++) { - linked->UniformBlocks[i] = &ubo_blocks[i]; + linked->Program->sh.UniformBlocks[i] = &ubo_blocks[i]; } linked->Program->info.num_ubos = num_ubo_blocks; |