glsl: Fix input/output structure matching across shader stages
authorSergii Romantsov <sergii.romantsov@globallogic.com>
Thu, 24 Jan 2019 12:33:55 +0000 (14:33 +0200)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 5 Apr 2019 00:02:23 +0000 (11:02 +1100)
commita7d40a13ec39df5c1e18c2afaf70988958c11933
treefec68c6560e644ae6dd949afdc46a09ad8118c62
parent738921afd92ea5a8f8fcc5f631a0cce42160335c
glsl: Fix input/output structure matching across shader stages

Section 7.4.1 (Shader Interface Matching) of the OpenGL 4.30 spec says:

    "Variables or block members declared as structures are considered
     to match in type if and only if structure members match in name,
     type, qualification, and declaration order."

Fixes:
     * layout-location-struct.shader_test

v2: rebased against master and small fixes

Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108250
src/compiler/glsl/ast_to_hir.cpp
src/compiler/glsl/link_varyings.cpp
src/compiler/glsl_types.cpp
src/compiler/glsl_types.h