st/mesa/glsl: set num_images directly in shader_info

This change also removes the now duplicate NumImages field.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Timothy Arceri
2016-11-09 13:35:11 +11:00
parent 4b30011d34
commit ae632afe4f
6 changed files with 13 additions and 20 deletions

View File

@@ -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;

View File

@@ -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) {