}
}
+static void
+link_and_validate_uniforms(struct gl_context *ctx,
+ struct gl_shader_program *prog,
+ unsigned num_explicit_uniform_locs)
+{
+ update_array_sizes(prog);
+ link_assign_uniform_locations(prog, ctx, num_explicit_uniform_locs);
+
+ link_assign_atomic_counter_resources(ctx, prog);
+ link_calculate_subroutine_compat(prog);
+ check_resources(ctx, prog);
+ check_subroutine_resources(prog);
+ check_image_resources(ctx, prog);
+ link_check_atomic_counter_resources(ctx, prog);
+}
+
static bool
link_varyings_and_uniforms(unsigned first, unsigned last,
unsigned num_explicit_uniform_locs,
if (!link_varyings(prog, first, last, ctx, mem_ctx))
return false;
- update_array_sizes(prog);
- link_assign_uniform_locations(prog, ctx, num_explicit_uniform_locs);
- link_assign_atomic_counter_resources(ctx, prog);
-
- link_calculate_subroutine_compat(prog);
- check_resources(ctx, prog);
- check_subroutine_resources(prog);
- check_image_resources(ctx, prog);
- link_check_atomic_counter_resources(ctx, prog);
+ link_and_validate_uniforms(ctx, prog, num_explicit_uniform_locs);
if (!prog->data->LinkStatus)
return false;