<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>></div><div><br></div><div>Marek<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 16, 2018 at 3:04 AM, Timothy Arceri <span dir="ltr"><<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In GLES shader versions must match but there is nothing<br>
in the ARB_ES*_compatibility specs that say they must match.<br>
<br>
This fixes some compilation errors in Google Earth VR.<br>
---<br>
src/compiler/glsl/linker.cpp | 6 ++++--<br>
1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp<br>
index f060c5316fa..2b7ee0ad5a6 100644<br>
--- a/src/compiler/glsl/linker.cpp<br>
+++ b/src/compiler/glsl/linker.cpp<br>
@@ -83,6 +83,7 @@<br>
#include "builtin_functions.h"<br>
#include "shader_cache.h"<br>
<br>
+#include "main/context.h"<br>
#include "main/imports.h"<br>
#include "main/shaderobj.h"<br>
#include "main/enums.h"<br>
@@ -4799,7 +4800,8 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)<br>
min_version = MIN2(min_version, prog->Shaders[i]->Version);<br>
max_version = MAX2(max_version, prog->Shaders[i]->Version);<br>
<br>
- if (prog->Shaders[i]->IsES != prog->Shaders[0]->IsES) {<br>
+ if (!_mesa_is_desktop_gl(ctx) &&<br>
+ prog->Shaders[i]->IsES != prog->Shaders[0]->IsES) {<br>
linker_error(prog, "all shaders must use same shading "<br>
"language version\n");<br>
goto done;<br>
@@ -4817,7 +4819,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)<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 (prog->Shaders[0]->IsES && min_version != max_version) {<br>
+ if (!_mesa_is_desktop_gl(ctx) && min_version != max_version) {<br>
linker_error(prog, "all shaders must use same shading "<br>
"language version\n");<br>
goto done;<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.17.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>