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:
parent
9337143313
commit
44fcbccd06
11 changed files with 114 additions and 13 deletions
|
|
@ -1,7 +1,7 @@
|
|||
440.frag
|
||||
ERROR: 0:11: 'location' : overlapping use of location 4
|
||||
ERROR: 0:13: 'component' : type overflows the available 4 components
|
||||
ERROR: 0:22: 'location' : fragment outputs or tileImageEXTs sharing the same location 30 must be the same basic type
|
||||
ERROR: 0:22: 'location' : the aliases sharing the location 30 must be the same basic type and interpolation qualification
|
||||
ERROR: 0:24: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
|
||||
ERROR: 0:25: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
|
||||
ERROR: 0:26: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
33
Test/baseResults/location_aliasing.tesc.out
Normal file
33
Test/baseResults/location_aliasing.tesc.out
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
location_aliasing.tesc
|
||||
ERROR: 0:7: 'location' : the aliases sharing the location 1 must be the same basic type and interpolation qualification
|
||||
ERROR: 1 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 430
|
||||
Requested GL_ARB_enhanced_layouts
|
||||
vertices = 1
|
||||
ERROR: node is still EOpNull!
|
||||
0:13 Function Definition: main( ( global void)
|
||||
0:13 Function Parameters:
|
||||
0:? Linker Objects
|
||||
0:? 'gohan' (layout( location=1 component=0) in 32-element array of double)
|
||||
0:? 'goten' (layout( location=1 component=2) in 32-element array of float)
|
||||
0:? 'vs_tcs' ( in 32-element array of 4-component vector of float)
|
||||
0:? 'tcs_tes' ( out 1-element array of 4-component vector of float)
|
||||
|
||||
|
||||
Linked tessellation control stage:
|
||||
|
||||
|
||||
Shader version: 430
|
||||
Requested GL_ARB_enhanced_layouts
|
||||
vertices = 1
|
||||
ERROR: node is still EOpNull!
|
||||
0:13 Function Definition: main( ( global void)
|
||||
0:13 Function Parameters:
|
||||
0:? Linker Objects
|
||||
0:? 'gohan' (layout( location=1 component=0) in 32-element array of double)
|
||||
0:? 'goten' (layout( location=1 component=2) in 32-element array of float)
|
||||
0:? 'vs_tcs' ( in 32-element array of 4-component vector of float)
|
||||
0:? 'tcs_tes' ( out 1-element array of 4-component vector of float)
|
||||
|
||||
27
Test/baseResults/location_aliasing1.frag.out
Normal file
27
Test/baseResults/location_aliasing1.frag.out
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
location_aliasing1.frag
|
||||
ERROR: 0:6: 'location' : the aliases sharing the location 1 must be the same basic type and interpolation qualification
|
||||
ERROR: 1 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 430
|
||||
Requested GL_ARB_enhanced_layouts
|
||||
ERROR: node is still EOpNull!
|
||||
0:8 Function Definition: main( ( global void)
|
||||
0:8 Function Parameters:
|
||||
0:? Linker Objects
|
||||
0:? 'in1' (layout( location=1 component=0) smooth in float)
|
||||
0:? 'in2' (layout( location=1 component=2) flat in float)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 430
|
||||
Requested GL_ARB_enhanced_layouts
|
||||
ERROR: node is still EOpNull!
|
||||
0:8 Function Definition: main( ( global void)
|
||||
0:8 Function Parameters:
|
||||
0:? Linker Objects
|
||||
0:? 'in1' (layout( location=1 component=0) smooth in float)
|
||||
0:? 'in2' (layout( location=1 component=2) flat in float)
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
spv.ext.ShaderTileImage.typemismatch.frag
|
||||
ERROR: 0:7: 'location' : fragment outputs or tileImageEXTs sharing the same location 0 must be the same basic type
|
||||
ERROR: 0:7: 'location' : the aliases sharing the location 0 must be the same basic type and interpolation qualification
|
||||
ERROR: 1 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
|
|
|||
15
Test/location_aliasing.tesc
Normal file
15
Test/location_aliasing.tesc
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#version 430 core
|
||||
#extension GL_ARB_enhanced_layouts : require
|
||||
|
||||
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()
|
||||
{
|
||||
}
|
||||
10
Test/location_aliasing1.frag
Normal file
10
Test/location_aliasing1.frag
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#version 430 core
|
||||
#extension GL_ARB_enhanced_layouts : require
|
||||
|
||||
|
||||
layout (location = 1, component = 0) in smooth float in1;
|
||||
layout (location = 1, component = 2) in flat float in2;
|
||||
|
||||
void main()
|
||||
{
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue