<html><body>Hello Grigori,<div>works perfectly - thank you very much!</div><div>Kind regards,</div><div><br></div><div>Michal</div><div><br><blockquote>Unnamed record types are assigned to separate types per stage, e.g.<br><br>uniform struct { ... } a;<br><br>if defined in both vertex and fragment shader, will result in two<br>separate types of different name. When linking the shader, this<br>results in a type conflict. However, there is no reason why this<br>should not be allowed according to GLSL specifications. Compare and<br>match record types when linking shader stages to avoid this conflict.<br>---<br> src/glsl/linker.cpp | 4 ++++<br> 1 file changed, 4 insertions(+)<br><br>diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp<br>index 1366077..c60753c 100644<br>--- a/src/glsl/linker.cpp<br>+++ b/src/glsl/linker.cpp<br>@@ -609,6 +609,10 @@ cross_validate_globals(struct gl_shader_program *prog,<br>              if (var->type->length != 0) {<br>                      existing->type = var->type;<br>                  }<br>+               } else if (var->type->is_record()<br>+            && existing->type->is_record()<br>+                 && existing->type->record_compare(var->type)) {<br>+            existing->type = var->type;<br>          } else {<br>                 linker_error(prog, "%s `%s' declared as type "<br>                           "`%s' and type `%s'\n",<br>-- <br>1.8.1.2<br><br>_______________________________________________<br>mesa-dev mailing list<br>mesa-dev@lists.freedesktop.org<br>http://lists.freedesktop.org/mailman/listinfo/mesa-dev</blockquote></div></body></html>