diff options
author | Timothy Arceri <[email protected]> | 2016-11-09 13:35:11 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-09 15:27:35 +1100 |
commit | ae632afe4fd860f016d2e5b360d66dc4e72ce72a (patch) | |
tree | 1d64fb52cbc54e1de3e78d66854964ccafc13ab9 /src/compiler | |
parent | 4b30011d34bff039b84f6cd14bf58ea691f549eb (diff) |
st/mesa/glsl: set num_images directly in shader_info
This change also removes the now duplicate NumImages field.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/link_uniforms.cpp | 2 | ||||
-rw-r--r-- | src/compiler/glsl/linker.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp index 57a7db41ff4..86711e22822 100644 --- a/src/compiler/glsl/link_uniforms.cpp +++ b/src/compiler/glsl/link_uniforms.cpp @@ -1318,7 +1318,7 @@ link_assign_uniform_locations(struct gl_shader_program *prog, } sh->Program->info.num_textures = uniform_size.num_shader_samplers; - sh->NumImages = uniform_size.num_shader_images; + sh->Program->info.num_images = uniform_size.num_shader_images; sh->num_uniform_components = uniform_size.num_shader_uniform_components; sh->num_combined_uniform_components = sh->num_uniform_components; diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index bf902bd862a..d187b66ab53 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -3220,12 +3220,13 @@ check_image_resources(struct gl_context *ctx, struct gl_shader_program *prog) struct gl_linked_shader *sh = prog->_LinkedShaders[i]; if (sh) { - if (sh->NumImages > ctx->Const.Program[i].MaxImageUniforms) + if (sh->Program->info.num_images > ctx->Const.Program[i].MaxImageUniforms) linker_error(prog, "Too many %s shader image uniforms (%u > %u)\n", - _mesa_shader_stage_to_string(i), sh->NumImages, + _mesa_shader_stage_to_string(i), + sh->Program->info.num_images, ctx->Const.Program[i].MaxImageUniforms); - total_image_units += sh->NumImages; + total_image_units += sh->Program->info.num_images; total_shader_storage_blocks += sh->Program->info.num_ssbos; if (i == MESA_SHADER_FRAGMENT) { |