uniform_size.process(var);
}
+ if (uniform_size.num_shader_samplers >
+ ctx->Const.Program[i].MaxTextureImageUnits) {
+ linker_error(prog, "Too many %s shader texture samplers\n",
+ _mesa_shader_stage_to_string(i));
+ continue;
+ }
+
+ if (uniform_size.num_shader_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->Program->info.num_images,
+ ctx->Const.Program[i].MaxImageUniforms);
+ continue;
+ }
+
sh->Program->info.num_textures = uniform_size.num_shader_samplers;
sh->Program->info.num_images = uniform_size.num_shader_images;
sh->num_uniform_components = uniform_size.num_shader_uniform_components;
}
}
+ if (prog->data->LinkStatus == LINKING_FAILURE) {
+ delete hiddenUniforms;
+ return;
+ }
+
prog->data->NumUniformStorage = uniform_size.num_active_uniforms;
prog->data->NumHiddenUniforms = uniform_size.num_hidden_uniforms;
if (sh == NULL)
continue;
- if (sh->Program->info.num_textures >
- ctx->Const.Program[i].MaxTextureImageUnits) {
- linker_error(prog, "Too many %s shader texture samplers\n",
- _mesa_shader_stage_to_string(i));
- }
-
if (sh->num_uniform_components >
ctx->Const.Program[i].MaxUniformComponents) {
if (ctx->Const.GLSLSkipStrictMaxUniformLimitCheck) {
struct gl_linked_shader *sh = prog->_LinkedShaders[i];
if (sh) {
- 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->Program->info.num_images,
- ctx->Const.Program[i].MaxImageUniforms);
-
total_image_units += sh->Program->info.num_images;
total_shader_storage_blocks += sh->Program->info.num_ssbos;
update_array_sizes(prog);
link_assign_uniform_locations(prog, ctx);
+ if (prog->data->LinkStatus == LINKING_FAILURE)
+ return;
+
link_assign_atomic_counter_resources(ctx, prog);
link_calculate_subroutine_compat(prog);
check_resources(ctx, prog);