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.
This commit is contained in:
jimihem 2024-04-27 00:05:08 +08:00 committed by GitHub
parent 9337143313
commit 44fcbccd06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 114 additions and 13 deletions

View file

@ -10,16 +10,21 @@ ERROR: 0:39: 'component' : type overflows the available 4 components
ERROR: 0:40: 'component' : type overflows the available 4 components
ERROR: 0:42: 'component' : cannot apply to a matrix, structure, or block
ERROR: 0:43: 'component' : cannot apply to a matrix, structure, or block
ERROR: 0:43: 'location' : the aliases sharing the location 33 must be the same basic type and interpolation qualification
ERROR: 0:44: 'component' : cannot apply to a matrix, structure, or block
ERROR: 0:44: 'location' : the aliases sharing the location 34 must be the same basic type and interpolation qualification
ERROR: 0:46: 'component' : must specify 'location' to use 'component'
ERROR: 0:52: 'location' : overlapping use of location 40
ERROR: 0:54: 'component' : type overflows the available 4 components
ERROR: 0:55: 'component' : type overflows the available 4 components
ERROR: 0:57: 'component' : cannot apply to a matrix, structure, or block
ERROR: 0:58: 'component' : cannot apply to a matrix, structure, or block
ERROR: 0:58: 'location' : the aliases sharing the location 43 must be the same basic type and interpolation qualification
ERROR: 0:61: 'location/component/index' : cannot declare a default, use a full declaration
ERROR: 0:64: 'location' : the aliases sharing the location 50 must be the same basic type and interpolation qualification
ERROR: 0:66: 'component' : doubles cannot start on an odd-numbered component
ERROR: 0:67: 'component' : type overflows the available 4 components
ERROR: 0:69: 'location' : the aliases sharing the location 53 must be the same basic type and interpolation qualification
ERROR: 0:71: 'location' : overlapping use of location 55
ERROR: 0:75: 'location' : overlapping use of location 57
ERROR: 0:78: 'location' : overlapping use of location 59
@ -56,7 +61,7 @@ ERROR: 0:193: 'assign' : l-value required "gl_BaseVertexARB" (can't modify shad
ERROR: 0:194: 'assign' : l-value required "gl_BaseInstanceARB" (can't modify shader input)
ERROR: 0:195: 'assign' : l-value required "gl_DrawIDARB" (can't modify shader input)
ERROR: 0:196: 'glBaseInstanceARB' : undeclared identifier
ERROR: 57 compilation errors. No code generated.
ERROR: 62 compilation errors. No code generated.
Shader version: 440