From 65d5a4f0440bbbc60a31bb58dfc746c3d24ac07c Mon Sep 17 00:00:00 2001 From: Marta Lofstedt Date: Tue, 3 Nov 2015 12:53:06 +0100 Subject: [PATCH] glsl: Interpolations qualifiers does no longer have to match Signed-off-by: Marta Lofstedt --- src/glsl/link_varyings.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 7e77a67..bedf335 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -96,20 +96,6 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, } } - /* Check that all of the qualifiers match between stages. - */ - if (input->data.centroid != output->data.centroid) { - linker_error(prog, - "%s shader output `%s' %s centroid qualifier, " - "but %s shader input %s centroid qualifier\n", - _mesa_shader_stage_to_string(producer_stage), - output->name, - (output->data.centroid) ? "has" : "lacks", - _mesa_shader_stage_to_string(consumer_stage), - (input->data.centroid) ? "has" : "lacks"); - return; - } - if (input->data.sample != output->data.sample) { linker_error(prog, "%s shader output `%s' %s sample qualifier, " @@ -146,29 +132,6 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, return; } - /* GLSL >= 4.40 removes text requiring interpolation qualifiers - * to match cross stage, they must only match within the same stage. - * - * From page 84 (page 90 of the PDF) of the GLSL 4.40 spec: - * - * "It is a link-time error if, within the same stage, the interpolation - * qualifiers of variables of the same name do not match. - * - */ - if (input->data.interpolation != output->data.interpolation && - prog->Version < 440) { - linker_error(prog, - "%s shader output `%s' specifies %s " - "interpolation qualifier, " - "but %s shader input specifies %s " - "interpolation qualifier\n", - _mesa_shader_stage_to_string(producer_stage), - output->name, - interpolation_string(output->data.interpolation), - _mesa_shader_stage_to_string(consumer_stage), - interpolation_string(input->data.interpolation)); - return; - } } /** -- 2.1.4