GLSL: Error when using location on an arrayed block.

This implements a recent change to the GLSL specification to enforce
this ill-defined situation.
This commit is contained in:
John Kessenich
2017-06-04 13:05:50 -06:00
parent 99f289d438
commit 8de7e7bf14
6 changed files with 55 additions and 4 deletions

View File

@@ -1,8 +1,11 @@
450.frag
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:62: 'location' : cannot use in a block array where new locations are needed for each block element
ERROR: 1 compilation errors. No code generated.
Shader version: 450
0:? Sequence
ERROR: node is still EOpNull!
0:8 Function Definition: main( ( global void)
0:8 Function Parameters:
0:10 Sequence
@@ -160,13 +163,15 @@ Shader version: 450
0:? 'us2dmsa' ( uniform usampler2DMSArray)
0:? 'ii2dms' (layout( rgba32i) uniform iimage2DMS)
0:? 'i2dmsa' (layout( rgba32f) uniform image2DMSArray)
0:? 'bInst1' ( in block{layout( location=6 component=0) in float f, layout( location=7) in float g})
0:? 'bInst2' ( in 3-element array of block{layout( location=8 component=0) in float f, layout( location=9) in float g})
Linked fragment stage:
Shader version: 450
0:? Sequence
ERROR: node is still EOpNull!
0:8 Function Definition: main( ( global void)
0:8 Function Parameters:
0:10 Sequence
@@ -273,4 +278,6 @@ Shader version: 450
0:? 'us2dmsa' ( uniform usampler2DMSArray)
0:? 'ii2dms' (layout( rgba32i) uniform iimage2DMS)
0:? 'i2dmsa' (layout( rgba32f) uniform image2DMSArray)
0:? 'bInst1' ( in block{layout( location=6 component=0) in float f, layout( location=7) in float g})
0:? 'bInst2' ( in 3-element array of block{layout( location=8 component=0) in float f, layout( location=9) in float g})

View File

@@ -1,9 +1,12 @@
450.tesc
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:20: 'location' : cannot use in a block array where new locations are needed for each block element
ERROR: 1 compilation errors. No code generated.
Shader version: 450
vertices = -1
0:? Sequence
ERROR: node is still EOpNull!
0:11 Function Definition: main( ( global void)
0:11 Function Parameters:
0:13 Sequence
@@ -30,6 +33,8 @@ vertices = -1
0:? Linker Objects
0:? 'gl_in' ( in 32-element array of block{ in 3-element array of float CullDistance gl_CullDistance})
0:? 'gl_out' ( out 4-element array of block{ out 3-element array of float CullDistance gl_CullDistance})
0:? 'bInst1' ( out 2-element array of block{layout( location=4 component=0) out float f, layout( location=5) out float g})
0:? 'bInst2' ( out 2-element array of 3-element array of block{layout( location=6 component=0) out float f, layout( location=7) out float g})
Linked tessellation control stage:
@@ -38,7 +43,7 @@ ERROR: Linking tessellation control stage: At least one shader must specify an o
Shader version: 450
vertices = -1
0:? Sequence
ERROR: node is still EOpNull!
0:11 Function Definition: main( ( global void)
0:11 Function Parameters:
0:13 Sequence
@@ -65,4 +70,6 @@ vertices = -1
0:? Linker Objects
0:? 'gl_in' ( in 32-element array of block{ in 3-element array of float CullDistance gl_CullDistance})
0:? 'gl_out' ( out 4-element array of block{ out 3-element array of float CullDistance gl_CullDistance})
0:? 'bInst1' ( out 2-element array of block{layout( location=4 component=0) out float f, layout( location=5) out float g})
0:? 'bInst2' ( out 2-element array of 3-element array of block{layout( location=6 component=0) out float f, layout( location=7) out float g})