diff options
author | Timothy Arceri <[email protected]> | 2016-11-05 08:44:22 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-06 11:21:41 +1100 |
commit | b792c3897927c1d89968bc0040faef02ec976184 (patch) | |
tree | c2de83abcdb6522dd42b2599127fbc1f1b2dccbe /src/compiler/glsl/link_uniforms.cpp | |
parent | a1da57c19c27505b9eab4792355f2f1b5c774a0a (diff) |
st/mesa/glsl/i965: set num_ubos directly in shader_info
This also removes the duplicate field in gl_linked_shader, and
gets num_ubos from shader_info instead.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/compiler/glsl/link_uniforms.cpp')
-rw-r--r-- | src/compiler/glsl/link_uniforms.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp index cd00837cca9..fd8331be497 100644 --- a/src/compiler/glsl/link_uniforms.cpp +++ b/src/compiler/glsl/link_uniforms.cpp @@ -901,7 +901,7 @@ link_update_uniform_buffer_variables(struct gl_linked_shader *shader, var->data.mode == ir_var_shader_storage); unsigned num_blocks = var->data.mode == ir_var_uniform ? - shader->NumUniformBlocks : shader->NumShaderStorageBlocks; + shader->Program->info.num_ubos : shader->NumShaderStorageBlocks; struct gl_uniform_block **blks = var->data.mode == ir_var_uniform ? shader->UniformBlocks : shader->ShaderStorageBlocks; @@ -1330,7 +1330,7 @@ link_assign_uniform_locations(struct gl_shader_program *prog, sh->num_uniform_components = uniform_size.num_shader_uniform_components; sh->num_combined_uniform_components = sh->num_uniform_components; - for (unsigned i = 0; i < sh->NumUniformBlocks; i++) { + for (unsigned i = 0; i < sh->Program->info.num_ubos; i++) { sh->num_combined_uniform_components += sh->UniformBlocks[i]->UniformBufferSize / 4; } |