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