location aliasing (#3438)
commit44fcbccd06b6e3596925d787774afe2a28d3fe16
authorjimihem <149994911+jimihem@users.noreply.github.com>
Fri, 26 Apr 2024 16:05:08 +0000 (27 00:05 +0800)
committerGitHub <noreply@github.com>
Fri, 26 Apr 2024 16:05:08 +0000 (26 12:05 -0400)
tree0a7bcac7b9712ec07951af6cb8e016ef0cea6de8
parent933714331300a229852637d75257ec93c978a94b
location aliasing (#3438)

* location aliasing
    when location aliasing, the aliases sharing the location must have the same underlying numerical type
    (floating-point or integer) and the same auxiliary storage and interpolation qualification.
    The following case, glslang need report error.

    layout(vertices = 1) out;

    layout (location = 1, component = 0)  in  double gohan[];
    layout (location = 1, component = 2)  in  float goten[];

    in  vec4 vs_tcs[];
    out vec4 tcs_tes[];

    void main()
    {
    }

* Need consider the following case: location aliasing with different interpolation qualifier.
Test/baseResults/440.frag.out
Test/baseResults/440.vert.out
Test/baseResults/location_aliasing.tesc.out [new file with mode: 0644]
Test/baseResults/location_aliasing1.frag.out [new file with mode: 0644]
Test/baseResults/spv.ext.ShaderTileImage.typemismatch.frag.out
Test/location_aliasing.tesc [new file with mode: 0644]
Test/location_aliasing1.frag [new file with mode: 0644]
glslang/MachineIndependent/ParseHelper.cpp
glslang/MachineIndependent/linkValidate.cpp
glslang/MachineIndependent/localintermediate.h
gtests/AST.FromFile.cpp