<div dir="ltr">On 18 October 2013 11:07, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 10/17/2013 08:07 PM, Paul Berry wrote:<br>
</div><div class="im">> Previously, Mesa followed the linkage rules outlined in the GLSL<br>
> 1.20-1.40 specs, which (collectively) said that GLSL versions 1.10 and<br>
> 1.20 could be linked together, but no other versions could be linked.<br>
><br>
> In GLSL 4.30, the linkage rules were relaxed so that any two desktop<br>
> GLSL versions can be linked together. This change was made because it<br>
> reflected the behaviour of nearly all existing implementations (see<br>
> Khronos bug 8463). Mesa was one of the few (perhaps the only)<br>
> exceptions to prohibit cross-linking of some GLSL versions.<br>
><br>
> Since the GLSL linkage rules were deliberately relaxed in order to<br>
> match the behaviour of existing implementations, it seems appropriate<br>
> to relax the rules in Mesa too (even though Mesa doesn't support GLSL<br>
> 4.30 yet).<br>
><br>
> Note that linking ES and desktop shaders is still prohibited, as is<br>
> linking ES shaders having different GLSL versions.<br>
><br>
> Fixes piglit tests "shaders/version-mixing {interstage,intrastage}".<br>
<br>
</div>Are there any piglit tests that now fail? It seems like we may have had<br>
one or two tests that verify the (old) spec behavior...<br></blockquote><div><br></div><div>I would have thought so, but I just did a full piglit run and didn't get any regressions, so I guess not.<br></div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
You should ping the reporter of this bug:<br>
<br>
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=70261" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=70261</a><br>
<br>
This should fix his problem as well.<br></blockquote><div><br></div><div>Good call. I'll do that once I've landed the patch.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
> ---<br>
> src/glsl/linker.cpp | 10 +++-------<br>
> 1 file changed, 3 insertions(+), 7 deletions(-)<br>
><br>
> diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp<br>
> index 9095a40..0a949b4 100644<br>
> --- a/src/glsl/linker.cpp<br>
> +++ b/src/glsl/linker.cpp<br>
> @@ -2057,14 +2057,10 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)<br>
> }<br>
> }<br>
><br>
> - /* Previous to GLSL version 1.30, different compilation units could mix and<br>
> - * match shading language versions. With GLSL 1.30 and later, the versions<br>
> - * of all shaders must match.<br>
> - *<br>
> - * GLSL ES has never allowed mixing of shading language versions.<br>
> + /* In desktop GLSL, different shader versions may be linked together. In<br>
> + * GLSL ES, all shader versions must be the same.<br>
> */<br>
> - if ((is_es_prog || max_version >= 130)<br>
> - && min_version != max_version) {<br>
> + if (is_es_prog && min_version != max_version) {<br>
> linker_error(prog, "all shaders must use same shading "<br>
> "language version\n");<br>
> goto done;<br>
><br>
<br>
</div></div></blockquote></div><br></div></div>