<html><head></head><body>Hi Jordan, writing this on my phone so apologies for being brief. I knew I had read the restriction was dropped in Es 3.1 somewhere. However it seems there might be some spec bugs here. The ES GLSL 3.1 and 3.2 specs both have a table that says interpolation must match. Also the GLSL 4.3 spec says they must match see quote in following link.<br>
<br>
Also removing the matching requirements will break the way we do packing. Which is addressed by this patch<br>
<br>
<a href="https://lists.freedesktop.org/archives/mesa-dev/2016-March/110164.html">https://lists.freedesktop.org/archives/mesa-dev/2016-March/110164.html</a><br>
<br>
<br><br><div class="gmail_quote">On 17 March 2016 6:57:27 am AEDT, Jordan Justen <jordan.l.justen@intel.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">The OpenGLES GLSL 3.1 and OpenGL GLSL 4.3 specifications both remove<br />the requirement for the output and input interpolation qualifiers to<br />match.<br /><br />Note: I'm changing desktop OpenGL to allow the interpolation to<br />differ, starting with 4.3, whereas the code previously used 4.4. (This<br />was first added in 32a220f1f60980de50ecefb3b9ab1f754ade8c83.)<br /><br />The OpenGL 4.2 spec says: "the last active shader stage output<br />variables and fragment shader input variables of the same name must<br />match in type and qualification (other than out matching to in)"<br /><br />The OpenGL 4.3 spec says: "interpolation qualification (e.g., flat)<br />and auxiliary qualification (e.g. centroid) may differ."<br /><br />The OpenGLES GLSL 3.00.4 specification says: "The output of the vertex<br />shader and the input of the fragment shader form an interface. For<br />this interface, vertex shader output variables and fragment shader<br />input variables of the same name must match in type and qualification<br />(other than precision and out matching to in)."<br /><br />The OpenGLES GLSL 3.10 Specification says: "interpolation<br />qualification (e.g., flat) and auxiliary qualification (e.g. centroid)<br />may differ"<br /><br />Signed-off-by: Jordan Justen <jordan.l.justen@intel.com><br />Cc: Tapani Pälli <tapani.palli@intel.com><br />---<br /> src/compiler/glsl/link_varyings.cpp | 14 +++-----------<br /> 1 file changed, 3 insertions(+), 11 deletions(-)<br /><br />diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp<br />index 9d7177d..0938cf1 100644<br />--- a/src/compiler/glsl/link_varyings.cpp<br />+++ b/src/compiler/glsl/link_varyings.cpp<br />@@ -172,17 +172,9 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog,<br />       return;<br />    }<br /> <br />-   /* GLSL >= 4.40 removes text requiring interpolation qualifiers<br />-    * to match cross stage, they must only match within the same stage.<br />-    *<br />-    * From page 84 (page 90 of the PDF) of the GLSL 4.40 spec:<br />-    *<br />-    *     "It is a link-time error if, within the same stage, the interpolation<br />-    *     qualifiers of variables of the same name do not match.<br />-    *<br />-    */<br />-   if (input->data.interpolation != output->data.interpolation &&<br />-       prog->Version < 440) {<br />+   /* Interpolation must match until OpenGL 4.3 and OpenGLES 3.1 */<br />+   if (prog->Version < (prog->IsES ? 310 : 430) &&<br />+       input->data.interpolation != output->data.interpolation) {<br />       linker_error(prog,<br />                    "%s shader output `%s' specifies %s "<br />                    "interpolation qualifier, "</pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>