diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index bc408922a5a..577bf544b46 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -554,59 +554,6 @@ validate_explicit_variable_location(const struct gl_constants *consts, return true; } -/** - * Validate explicit locations for the inputs to the first stage and the - * outputs of the last stage in a program, if those are not the VS and FS - * shaders. - */ -void -validate_first_and_last_interface_explicit_locations(const struct gl_constants *consts, - struct gl_shader_program *prog, - gl_shader_stage first_stage, - gl_shader_stage last_stage) -{ - /* VS inputs and FS outputs are validated in - * assign_attribute_or_color_locations() - */ - bool validate_first_stage = first_stage != MESA_SHADER_VERTEX; - bool validate_last_stage = last_stage != MESA_SHADER_FRAGMENT; - if (!validate_first_stage && !validate_last_stage) - return; - - struct explicit_location_info explicit_locations[MAX_VARYING][4]; - - gl_shader_stage stages[2] = { first_stage, last_stage }; - bool validate_stage[2] = { validate_first_stage, validate_last_stage }; - ir_variable_mode var_direction[2] = { ir_var_shader_in, ir_var_shader_out }; - - for (unsigned i = 0; i < 2; i++) { - if (!validate_stage[i]) - continue; - - gl_shader_stage stage = stages[i]; - - gl_linked_shader *sh = prog->_LinkedShaders[stage]; - assert(sh); - - memset(explicit_locations, 0, sizeof(explicit_locations)); - - foreach_in_list(ir_instruction, node, sh->ir) { - ir_variable *const var = node->as_variable(); - - if (var == NULL || - !var->data.explicit_location || - var->data.location < VARYING_SLOT_VAR0 || - var->data.mode != var_direction[i]) - continue; - - if (!validate_explicit_variable_location( - consts, explicit_locations, var, prog, sh)) { - return; - } - } - } -} - /** * Check if we should force input / output matching between shader * interfaces. diff --git a/src/compiler/glsl/link_varyings.h b/src/compiler/glsl/link_varyings.h index 90fa9223539..4e41e7ebbb2 100644 --- a/src/compiler/glsl/link_varyings.h +++ b/src/compiler/glsl/link_varyings.h @@ -33,12 +33,6 @@ struct gl_shader_program; -void -validate_first_and_last_interface_explicit_locations(const struct gl_constants *consts, - struct gl_shader_program *prog, - gl_shader_stage first, - gl_shader_stage last); - void cross_validate_outputs_to_inputs(const struct gl_constants *consts, struct gl_shader_program *prog,