mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 11:30:06 +00:00
* rework how shader interface block naming rules are handled * Fixes 2136 According to the spec, shader interfaces (uniform blocks, buffer blocks, input blocks, output blocks) all should be matched up via their block names across all compilation units, not instance names. Also, all block names can be re-used between all 4 interface types without conflict. This change makes it so all of these blocks are matched and remapped using block name and not by instance name. Additional the rule that matched uniform and buffer blocks must either be anonymous or named (but not nessearily the same name) is now imposed. * add warning if instance names differ between matched shader interfaces * Add test cases from #2137 which is now fixed as well. * replace some tab characters with spaces * buffer blocks and uniform blocks now share the same block namespace
This commit is contained in:
parent
1fff362355
commit
0b66fa3b62
177
Test/baseResults/link.multiAnonBlocksInvalid.0.0.vert.out
Executable file
177
Test/baseResults/link.multiAnonBlocksInvalid.0.0.vert.out
Executable file
@ -0,0 +1,177 @@
|
||||
link.multiAnonBlocksInvalid.0.0.vert
|
||||
ERROR: 0:22: 'ColorBlock' : nameless block contains a member that already has a name at global scope
|
||||
ERROR: 0:42: 'v1' : redefinition
|
||||
ERROR: 0:43: 'uProj' : redefinition
|
||||
ERROR: 3 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 430
|
||||
ERROR: node is still EOpNull!
|
||||
0:46 Function Definition: main( ( global void)
|
||||
0:46 Function Parameters:
|
||||
0:48 Sequence
|
||||
0:48 move second child to first child ( temp 4-component vector of float)
|
||||
0:48 'oColor' ( smooth out 4-component vector of float)
|
||||
0:48 component-wise multiply ( temp 4-component vector of float)
|
||||
0:48 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:48 'anon@3' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2, layout( column_major std140 offset=32) uniform 4-component vector of float v1})
|
||||
0:48 Constant:
|
||||
0:48 0 (const uint)
|
||||
0:48 Function Call: getColor2( ( global 4-component vector of float)
|
||||
0:49 move second child to first child ( temp 4-component vector of float)
|
||||
0:49 v1: direct index for structure ( out 4-component vector of float)
|
||||
0:49 'anon@2' ( out block{ out 4-component vector of float v1})
|
||||
0:49 Constant:
|
||||
0:49 0 (const uint)
|
||||
0:49 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:49 'anon@3' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2, layout( column_major std140 offset=32) uniform 4-component vector of float v1})
|
||||
0:49 Constant:
|
||||
0:49 0 (const uint)
|
||||
0:51 move second child to first child ( temp 4-component vector of float)
|
||||
0:51 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||
0:51 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:51 Constant:
|
||||
0:51 0 (const uint)
|
||||
0:51 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:51 uProj: direct index for structure (layout( column_major std140 offset=0) uniform 4X4 matrix of float)
|
||||
0:51 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj})
|
||||
0:51 Constant:
|
||||
0:51 0 (const uint)
|
||||
0:51 Function Call: getWorld( ( global 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj})
|
||||
0:? 'anon@1' (layout( column_major shared) buffer block{layout( column_major shared) buffer 4-component vector of float b})
|
||||
0:? 'anon@2' ( out block{ out 4-component vector of float v1})
|
||||
0:? 'myName' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float m})
|
||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||
0:? 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
|
||||
link.multiAnonBlocksInvalid.0.1.vert
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:38 Function Definition: getColor2( ( global 4-component vector of float)
|
||||
0:38 Function Parameters:
|
||||
0:40 Sequence
|
||||
0:40 Branch: Return with expression
|
||||
0:40 color2: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:40 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2})
|
||||
0:40 Constant:
|
||||
0:40 0 (const uint)
|
||||
0:43 Function Definition: getWorld( ( global 4-component vector of float)
|
||||
0:43 Function Parameters:
|
||||
0:45 Sequence
|
||||
0:45 Branch: Return with expression
|
||||
0:45 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:45 uWorld: direct index for structure (layout( column_major std140 offset=64) uniform 4X4 matrix of float)
|
||||
0:45 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:45 Constant:
|
||||
0:45 1 (const uint)
|
||||
0:45 'P' ( in 4-component vector of float)
|
||||
0:46 move second child to first child ( temp 4-component vector of float)
|
||||
0:46 v2: direct index for structure ( out 4-component vector of float)
|
||||
0:46 'anon@2' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:46 Constant:
|
||||
0:46 1 (const uint)
|
||||
0:46 Constant:
|
||||
0:46 1.000000
|
||||
0:46 1.000000
|
||||
0:46 1.000000
|
||||
0:46 1.000000
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2})
|
||||
0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:? 'anon@2' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:? 'anon@3' (layout( column_major shared) buffer block{layout( column_major shared) buffer 4-component vector of float a})
|
||||
0:? 'anon@4' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float m})
|
||||
0:? 'P' ( in 4-component vector of float)
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
ERROR: Linking vertex stage: Types must match:
|
||||
anon@0: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj}" versus anon@1: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld}"
|
||||
ERROR: Linking vertex stage: Types must match:
|
||||
anon@2: " out block{ out 4-component vector of float v1}" versus " out block{ out 4-component vector of float v1, out 4-component vector of float v2}"
|
||||
ERROR: Linking vertex stage: Types must match:
|
||||
anon@1: "layout( column_major shared) buffer block{layout( column_major shared) buffer 4-component vector of float b}" versus anon@3: "layout( column_major shared) buffer block{layout( column_major shared) buffer 4-component vector of float a}"
|
||||
ERROR: Linking vertex stage: Matched Uniform or Storage blocks must all be anonymous, or all be named:
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
myName: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float m}" versus anon@4: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float m}"
|
||||
|
||||
Shader version: 430
|
||||
ERROR: node is still EOpNull!
|
||||
0:46 Function Definition: main( ( global void)
|
||||
0:46 Function Parameters:
|
||||
0:48 Sequence
|
||||
0:48 move second child to first child ( temp 4-component vector of float)
|
||||
0:48 'oColor' ( smooth out 4-component vector of float)
|
||||
0:48 component-wise multiply ( temp 4-component vector of float)
|
||||
0:48 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:48 'anon@3' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2, layout( column_major std140 offset=32) uniform 4-component vector of float v1})
|
||||
0:48 Constant:
|
||||
0:48 0 (const uint)
|
||||
0:48 Function Call: getColor2( ( global 4-component vector of float)
|
||||
0:49 move second child to first child ( temp 4-component vector of float)
|
||||
0:49 v1: direct index for structure ( out 4-component vector of float)
|
||||
0:49 'anon@2' ( out block{ out 4-component vector of float v1})
|
||||
0:49 Constant:
|
||||
0:49 0 (const uint)
|
||||
0:49 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:49 'anon@3' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2, layout( column_major std140 offset=32) uniform 4-component vector of float v1})
|
||||
0:49 Constant:
|
||||
0:49 0 (const uint)
|
||||
0:51 move second child to first child ( temp 4-component vector of float)
|
||||
0:51 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||
0:51 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:51 Constant:
|
||||
0:51 0 (const uint)
|
||||
0:51 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:51 uProj: direct index for structure (layout( column_major std140 offset=0) uniform 4X4 matrix of float)
|
||||
0:51 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj})
|
||||
0:51 Constant:
|
||||
0:51 0 (const uint)
|
||||
0:51 Function Call: getWorld( ( global 4-component vector of float)
|
||||
0:38 Function Definition: getColor2( ( global 4-component vector of float)
|
||||
0:38 Function Parameters:
|
||||
0:40 Sequence
|
||||
0:40 Branch: Return with expression
|
||||
0:40 color2: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:40 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2})
|
||||
0:40 Constant:
|
||||
0:40 0 (const uint)
|
||||
0:43 Function Definition: getWorld( ( global 4-component vector of float)
|
||||
0:43 Function Parameters:
|
||||
0:45 Sequence
|
||||
0:45 Branch: Return with expression
|
||||
0:45 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:45 uWorld: direct index for structure (layout( column_major std140 offset=64) uniform 4X4 matrix of float)
|
||||
0:45 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:45 Constant:
|
||||
0:45 1 (const uint)
|
||||
0:45 'P' ( in 4-component vector of float)
|
||||
0:46 move second child to first child ( temp 4-component vector of float)
|
||||
0:46 v2: direct index for structure ( out 4-component vector of float)
|
||||
0:46 'anon@2' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:46 Constant:
|
||||
0:46 1 (const uint)
|
||||
0:46 Constant:
|
||||
0:46 1.000000
|
||||
0:46 1.000000
|
||||
0:46 1.000000
|
||||
0:46 1.000000
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj})
|
||||
0:? 'anon@1' (layout( column_major shared) buffer block{layout( column_major shared) buffer 4-component vector of float b})
|
||||
0:? 'anon@2' ( out block{ out 4-component vector of float v1})
|
||||
0:? 'myName' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float m})
|
||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||
0:? 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
0:? 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2})
|
||||
0:? 'P' ( in 4-component vector of float)
|
||||
|
157
Test/baseResults/link.multiAnonBlocksValid.0.0.vert.out
Executable file
157
Test/baseResults/link.multiAnonBlocksValid.0.0.vert.out
Executable file
@ -0,0 +1,157 @@
|
||||
link.multiAnonBlocksValid.0.0.vert
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:32 Function Definition: main( ( global void)
|
||||
0:32 Function Parameters:
|
||||
0:34 Sequence
|
||||
0:34 move second child to first child ( temp 4-component vector of float)
|
||||
0:34 'oColor' ( smooth out 4-component vector of float)
|
||||
0:34 component-wise multiply ( temp 4-component vector of float)
|
||||
0:34 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:34 'anon@2' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:34 Constant:
|
||||
0:34 0 (const uint)
|
||||
0:34 Function Call: getColor2( ( global 4-component vector of float)
|
||||
0:35 move second child to first child ( temp 4-component vector of float)
|
||||
0:35 v1: direct index for structure ( out 4-component vector of float)
|
||||
0:35 'anon@1' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:35 Constant:
|
||||
0:35 0 (const uint)
|
||||
0:35 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:35 'anon@2' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:35 Constant:
|
||||
0:35 0 (const uint)
|
||||
0:37 move second child to first child ( temp 4-component vector of float)
|
||||
0:37 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||
0:37 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:37 Constant:
|
||||
0:37 0 (const uint)
|
||||
0:37 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:37 uProj: direct index for structure (layout( column_major std140 offset=0) uniform 4X4 matrix of float)
|
||||
0:37 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:37 Constant:
|
||||
0:37 0 (const uint)
|
||||
0:37 Function Call: getWorld( ( global 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:? 'anon@1' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:? 'anon@2' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||
0:? 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
|
||||
link.multiAnonBlocksValid.0.1.vert
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:24 Function Definition: getColor2( ( global 4-component vector of float)
|
||||
0:24 Function Parameters:
|
||||
0:26 Sequence
|
||||
0:26 Branch: Return with expression
|
||||
0:26 color2: direct index for structure (layout( column_major std140 offset=16) uniform 4-component vector of float)
|
||||
0:26 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:26 Constant:
|
||||
0:26 1 (const uint)
|
||||
0:29 Function Definition: getWorld( ( global 4-component vector of float)
|
||||
0:29 Function Parameters:
|
||||
0:31 Sequence
|
||||
0:31 Branch: Return with expression
|
||||
0:31 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:31 uWorld: direct index for structure (layout( column_major std140 offset=64) uniform 4X4 matrix of float)
|
||||
0:31 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:31 Constant:
|
||||
0:31 1 (const uint)
|
||||
0:31 'P' ( in 4-component vector of float)
|
||||
0:32 move second child to first child ( temp 4-component vector of float)
|
||||
0:32 v2: direct index for structure ( out 4-component vector of float)
|
||||
0:32 'anon@2' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:32 Constant:
|
||||
0:32 1 (const uint)
|
||||
0:32 Constant:
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:? 'anon@2' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:? 'P' ( in 4-component vector of float)
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:32 Function Definition: main( ( global void)
|
||||
0:32 Function Parameters:
|
||||
0:34 Sequence
|
||||
0:34 move second child to first child ( temp 4-component vector of float)
|
||||
0:34 'oColor' ( smooth out 4-component vector of float)
|
||||
0:34 component-wise multiply ( temp 4-component vector of float)
|
||||
0:34 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:34 'anon@2' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:34 Constant:
|
||||
0:34 0 (const uint)
|
||||
0:34 Function Call: getColor2( ( global 4-component vector of float)
|
||||
0:35 move second child to first child ( temp 4-component vector of float)
|
||||
0:35 v1: direct index for structure ( out 4-component vector of float)
|
||||
0:35 'anon@1' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:35 Constant:
|
||||
0:35 0 (const uint)
|
||||
0:35 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:35 'anon@2' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:35 Constant:
|
||||
0:35 0 (const uint)
|
||||
0:37 move second child to first child ( temp 4-component vector of float)
|
||||
0:37 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||
0:37 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:37 Constant:
|
||||
0:37 0 (const uint)
|
||||
0:37 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:37 uProj: direct index for structure (layout( column_major std140 offset=0) uniform 4X4 matrix of float)
|
||||
0:37 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:37 Constant:
|
||||
0:37 0 (const uint)
|
||||
0:37 Function Call: getWorld( ( global 4-component vector of float)
|
||||
0:24 Function Definition: getColor2( ( global 4-component vector of float)
|
||||
0:24 Function Parameters:
|
||||
0:26 Sequence
|
||||
0:26 Branch: Return with expression
|
||||
0:26 color2: direct index for structure (layout( column_major std140 offset=16) uniform 4-component vector of float)
|
||||
0:26 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:26 Constant:
|
||||
0:26 1 (const uint)
|
||||
0:29 Function Definition: getWorld( ( global 4-component vector of float)
|
||||
0:29 Function Parameters:
|
||||
0:31 Sequence
|
||||
0:31 Branch: Return with expression
|
||||
0:31 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:31 uWorld: direct index for structure (layout( column_major std140 offset=64) uniform 4X4 matrix of float)
|
||||
0:31 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:31 Constant:
|
||||
0:31 1 (const uint)
|
||||
0:31 'P' ( in 4-component vector of float)
|
||||
0:32 move second child to first child ( temp 4-component vector of float)
|
||||
0:32 v2: direct index for structure ( out 4-component vector of float)
|
||||
0:32 'anon@2' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:32 Constant:
|
||||
0:32 1 (const uint)
|
||||
0:32 Constant:
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:? 'anon@1' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:? 'anon@2' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||
0:? 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
0:? 'P' ( in 4-component vector of float)
|
||||
|
182
Test/baseResults/link.multiBlocksInvalid.0.0.vert.out
Executable file
182
Test/baseResults/link.multiBlocksInvalid.0.0.vert.out
Executable file
@ -0,0 +1,182 @@
|
||||
link.multiBlocksInvalid.0.0.vert
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:34 Function Definition: main( ( global void)
|
||||
0:34 Function Parameters:
|
||||
0:36 Sequence
|
||||
0:36 move second child to first child ( temp 4-component vector of float)
|
||||
0:36 'oColor' ( smooth out 4-component vector of float)
|
||||
0:36 component-wise multiply ( temp 4-component vector of float)
|
||||
0:36 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:36 'uC' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1})
|
||||
0:36 Constant:
|
||||
0:36 0 (const int)
|
||||
0:36 Function Call: getColor2( ( global 4-component vector of float)
|
||||
0:37 move second child to first child ( temp 4-component vector of float)
|
||||
0:37 v1: direct index for structure ( out 4-component vector of float)
|
||||
0:37 'oV' ( out block{ out 4-component vector of float v1})
|
||||
0:37 Constant:
|
||||
0:37 0 (const int)
|
||||
0:37 add ( temp 4-component vector of float)
|
||||
0:37 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:37 'uC' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1})
|
||||
0:37 Constant:
|
||||
0:37 0 (const int)
|
||||
0:37 color1: direct index for structure (layout( column_major std430 offset=0) buffer 4-component vector of float)
|
||||
0:37 'uBufC' (layout( column_major std430) buffer block{layout( column_major std430 offset=0) buffer 4-component vector of float color1})
|
||||
0:37 Constant:
|
||||
0:37 0 (const int)
|
||||
0:39 move second child to first child ( temp 4-component vector of float)
|
||||
0:39 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||
0:39 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:39 Constant:
|
||||
0:39 0 (const uint)
|
||||
0:39 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:39 uProj: direct index for structure (layout( column_major std140 offset=0) uniform 4X4 matrix of float)
|
||||
0:39 'uD' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj})
|
||||
0:39 Constant:
|
||||
0:39 0 (const int)
|
||||
0:39 Function Call: getWorld( ( global 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'uD' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj})
|
||||
0:? 'oV' ( out block{ out 4-component vector of float v1})
|
||||
0:? 'uC' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1})
|
||||
0:? 'uBufC' (layout( column_major std430) buffer block{layout( column_major std430 offset=0) buffer 4-component vector of float color1})
|
||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
|
||||
link.multiBlocksInvalid.0.1.vert
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:21 Function Definition: getColor2( ( global 4-component vector of float)
|
||||
0:21 Function Parameters:
|
||||
0:23 Sequence
|
||||
0:23 Branch: Return with expression
|
||||
0:23 color2: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:23 'uColorB' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2})
|
||||
0:23 Constant:
|
||||
0:23 0 (const int)
|
||||
0:26 Function Definition: getWorld( ( global 4-component vector of float)
|
||||
0:26 Function Parameters:
|
||||
0:28 Sequence
|
||||
0:28 Branch: Return with expression
|
||||
0:28 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:28 uWorld: direct index for structure (layout( column_major std140 offset=0) uniform 4X4 matrix of float)
|
||||
0:28 'uDefaultB' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uWorld})
|
||||
0:28 Constant:
|
||||
0:28 0 (const int)
|
||||
0:28 'P' ( in 4-component vector of float)
|
||||
0:29 move second child to first child ( temp 4-component vector of float)
|
||||
0:29 v2: direct index for structure ( out 4-component vector of float)
|
||||
0:29 'oVert' ( out block{ out 4-component vector of float v2})
|
||||
0:29 Constant:
|
||||
0:29 0 (const int)
|
||||
0:29 Constant:
|
||||
0:29 1.000000
|
||||
0:29 1.000000
|
||||
0:29 1.000000
|
||||
0:29 1.000000
|
||||
0:? Linker Objects
|
||||
0:? 'uColorB' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2})
|
||||
0:? 'uDefaultB' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uWorld})
|
||||
0:? 'oVert' ( out block{ out 4-component vector of float v2})
|
||||
0:? 'P' ( in 4-component vector of float)
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
ERROR: Linking vertex stage: Types must match:
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
uC: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1}" versus uColorB: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2}"
|
||||
ERROR: Linking vertex stage: Types must match:
|
||||
ERROR: Linking vertex stage: Storage qualifiers must match:
|
||||
ERROR: Linking vertex stage: Layout qualification must match:
|
||||
uBufC: "layout( column_major std430) buffer block{layout( column_major std430 offset=0) buffer 4-component vector of float color1}" versus uColorB: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2}"
|
||||
ERROR: Linking vertex stage: Types must match:
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
uD: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj}" versus uDefaultB: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uWorld}"
|
||||
ERROR: Linking vertex stage: Types must match:
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
oV: " out block{ out 4-component vector of float v1}" versus oVert: " out block{ out 4-component vector of float v2}"
|
||||
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:34 Function Definition: main( ( global void)
|
||||
0:34 Function Parameters:
|
||||
0:36 Sequence
|
||||
0:36 move second child to first child ( temp 4-component vector of float)
|
||||
0:36 'oColor' ( smooth out 4-component vector of float)
|
||||
0:36 component-wise multiply ( temp 4-component vector of float)
|
||||
0:36 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:36 'uC' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1})
|
||||
0:36 Constant:
|
||||
0:36 0 (const int)
|
||||
0:36 Function Call: getColor2( ( global 4-component vector of float)
|
||||
0:37 move second child to first child ( temp 4-component vector of float)
|
||||
0:37 v1: direct index for structure ( out 4-component vector of float)
|
||||
0:37 'oV' ( out block{ out 4-component vector of float v1})
|
||||
0:37 Constant:
|
||||
0:37 0 (const int)
|
||||
0:37 add ( temp 4-component vector of float)
|
||||
0:37 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:37 'uC' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1})
|
||||
0:37 Constant:
|
||||
0:37 0 (const int)
|
||||
0:37 color1: direct index for structure (layout( column_major std430 offset=0) buffer 4-component vector of float)
|
||||
0:37 'uBufC' (layout( column_major std430) buffer block{layout( column_major std430 offset=0) buffer 4-component vector of float color1})
|
||||
0:37 Constant:
|
||||
0:37 0 (const int)
|
||||
0:39 move second child to first child ( temp 4-component vector of float)
|
||||
0:39 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||
0:39 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:39 Constant:
|
||||
0:39 0 (const uint)
|
||||
0:39 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:39 uProj: direct index for structure (layout( column_major std140 offset=0) uniform 4X4 matrix of float)
|
||||
0:39 'uD' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj})
|
||||
0:39 Constant:
|
||||
0:39 0 (const int)
|
||||
0:39 Function Call: getWorld( ( global 4-component vector of float)
|
||||
0:21 Function Definition: getColor2( ( global 4-component vector of float)
|
||||
0:21 Function Parameters:
|
||||
0:23 Sequence
|
||||
0:23 Branch: Return with expression
|
||||
0:23 color2: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:23 'uColorB' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2})
|
||||
0:23 Constant:
|
||||
0:23 0 (const int)
|
||||
0:26 Function Definition: getWorld( ( global 4-component vector of float)
|
||||
0:26 Function Parameters:
|
||||
0:28 Sequence
|
||||
0:28 Branch: Return with expression
|
||||
0:28 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:28 uWorld: direct index for structure (layout( column_major std140 offset=0) uniform 4X4 matrix of float)
|
||||
0:28 'uDefaultB' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uWorld})
|
||||
0:28 Constant:
|
||||
0:28 0 (const int)
|
||||
0:28 'P' ( in 4-component vector of float)
|
||||
0:29 move second child to first child ( temp 4-component vector of float)
|
||||
0:29 v2: direct index for structure ( out 4-component vector of float)
|
||||
0:29 'oVert' ( out block{ out 4-component vector of float v2})
|
||||
0:29 Constant:
|
||||
0:29 0 (const int)
|
||||
0:29 Constant:
|
||||
0:29 1.000000
|
||||
0:29 1.000000
|
||||
0:29 1.000000
|
||||
0:29 1.000000
|
||||
0:? Linker Objects
|
||||
0:? 'uD' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj})
|
||||
0:? 'oV' ( out block{ out 4-component vector of float v1})
|
||||
0:? 'uC' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1})
|
||||
0:? 'uBufC' (layout( column_major std430) buffer block{layout( column_major std430 offset=0) buffer 4-component vector of float color1})
|
||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
0:? 'P' ( in 4-component vector of float)
|
||||
|
163
Test/baseResults/link.multiBlocksValid.1.0.vert.out
Executable file
163
Test/baseResults/link.multiBlocksValid.1.0.vert.out
Executable file
@ -0,0 +1,163 @@
|
||||
link.multiBlocksValid.1.0.vert
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:26 Function Definition: main( ( global void)
|
||||
0:26 Function Parameters:
|
||||
0:28 Sequence
|
||||
0:28 move second child to first child ( temp 4-component vector of float)
|
||||
0:28 'oColor' ( smooth out 4-component vector of float)
|
||||
0:28 component-wise multiply ( temp 4-component vector of float)
|
||||
0:28 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:28 'c' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:28 Constant:
|
||||
0:28 0 (const int)
|
||||
0:28 Function Call: getColor2( ( global 4-component vector of float)
|
||||
0:29 move second child to first child ( temp 4-component vector of float)
|
||||
0:29 v1: direct index for structure ( out 4-component vector of float)
|
||||
0:29 'b' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:29 Constant:
|
||||
0:29 0 (const int)
|
||||
0:29 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:29 'c' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:29 Constant:
|
||||
0:29 0 (const int)
|
||||
0:31 move second child to first child ( temp 4-component vector of float)
|
||||
0:31 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||
0:31 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:31 Constant:
|
||||
0:31 0 (const uint)
|
||||
0:31 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:31 uProj: direct index for structure (layout( column_major std140 offset=0) uniform 4X4 matrix of float)
|
||||
0:31 'a' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:31 Constant:
|
||||
0:31 0 (const int)
|
||||
0:31 Function Call: getWorld( ( global 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'a' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:? 'b' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:? 'c' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
|
||||
link.multiBlocksValid.1.1.vert
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:24 Function Definition: getColor2( ( global 4-component vector of float)
|
||||
0:24 Function Parameters:
|
||||
0:26 Sequence
|
||||
0:26 Branch: Return with expression
|
||||
0:26 color2: direct index for structure (layout( column_major std140 offset=16) uniform 4-component vector of float)
|
||||
0:26 'a' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:26 Constant:
|
||||
0:26 1 (const int)
|
||||
0:29 Function Definition: getWorld( ( global 4-component vector of float)
|
||||
0:29 Function Parameters:
|
||||
0:31 Sequence
|
||||
0:31 Branch: Return with expression
|
||||
0:31 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:31 uWorld: direct index for structure (layout( column_major std140 offset=64) uniform 4X4 matrix of float)
|
||||
0:31 'b' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:31 Constant:
|
||||
0:31 1 (const int)
|
||||
0:31 'P' ( in 4-component vector of float)
|
||||
0:32 move second child to first child ( temp 4-component vector of float)
|
||||
0:32 v2: direct index for structure ( out 4-component vector of float)
|
||||
0:32 'c' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:32 Constant:
|
||||
0:32 1 (const int)
|
||||
0:32 Constant:
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:? Linker Objects
|
||||
0:? 'a' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:? 'b' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:? 'c' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:? 'P' ( in 4-component vector of float)
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
c: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2}" versus a: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2}"
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
a: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld}" versus b: "layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld}"
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
b: " out block{ out 4-component vector of float v1, out 4-component vector of float v2}" versus c: " out block{ out 4-component vector of float v1, out 4-component vector of float v2}"
|
||||
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:26 Function Definition: main( ( global void)
|
||||
0:26 Function Parameters:
|
||||
0:28 Sequence
|
||||
0:28 move second child to first child ( temp 4-component vector of float)
|
||||
0:28 'oColor' ( smooth out 4-component vector of float)
|
||||
0:28 component-wise multiply ( temp 4-component vector of float)
|
||||
0:28 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:28 'c' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:28 Constant:
|
||||
0:28 0 (const int)
|
||||
0:28 Function Call: getColor2( ( global 4-component vector of float)
|
||||
0:29 move second child to first child ( temp 4-component vector of float)
|
||||
0:29 v1: direct index for structure ( out 4-component vector of float)
|
||||
0:29 'b' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:29 Constant:
|
||||
0:29 0 (const int)
|
||||
0:29 color1: direct index for structure (layout( column_major std140 offset=0) uniform 4-component vector of float)
|
||||
0:29 'c' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:29 Constant:
|
||||
0:29 0 (const int)
|
||||
0:31 move second child to first child ( temp 4-component vector of float)
|
||||
0:31 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||
0:31 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:31 Constant:
|
||||
0:31 0 (const uint)
|
||||
0:31 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:31 uProj: direct index for structure (layout( column_major std140 offset=0) uniform 4X4 matrix of float)
|
||||
0:31 'a' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:31 Constant:
|
||||
0:31 0 (const int)
|
||||
0:31 Function Call: getWorld( ( global 4-component vector of float)
|
||||
0:24 Function Definition: getColor2( ( global 4-component vector of float)
|
||||
0:24 Function Parameters:
|
||||
0:26 Sequence
|
||||
0:26 Branch: Return with expression
|
||||
0:26 color2: direct index for structure (layout( column_major std140 offset=16) uniform 4-component vector of float)
|
||||
0:26 'a' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:26 Constant:
|
||||
0:26 1 (const int)
|
||||
0:29 Function Definition: getWorld( ( global 4-component vector of float)
|
||||
0:29 Function Parameters:
|
||||
0:31 Sequence
|
||||
0:31 Branch: Return with expression
|
||||
0:31 matrix-times-vector ( temp 4-component vector of float)
|
||||
0:31 uWorld: direct index for structure (layout( column_major std140 offset=64) uniform 4X4 matrix of float)
|
||||
0:31 'b' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:31 Constant:
|
||||
0:31 1 (const int)
|
||||
0:31 'P' ( in 4-component vector of float)
|
||||
0:32 move second child to first child ( temp 4-component vector of float)
|
||||
0:32 v2: direct index for structure ( out 4-component vector of float)
|
||||
0:32 'c' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:32 Constant:
|
||||
0:32 1 (const int)
|
||||
0:32 Constant:
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:32 1.000000
|
||||
0:? Linker Objects
|
||||
0:? 'a' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform 4X4 matrix of float uWorld})
|
||||
0:? 'b' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||
0:? 'c' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||
0:? 'P' ( in 4-component vector of float)
|
||||
|
321
Test/baseResults/link.vk.multiBlocksValid.0.0.vert.out
Executable file
321
Test/baseResults/link.vk.multiBlocksValid.0.0.vert.out
Executable file
@ -0,0 +1,321 @@
|
||||
link.vk.multiBlocksValid.0.0.vert
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:43 Function Definition: main( ( global void)
|
||||
0:43 Function Parameters:
|
||||
0:45 Sequence
|
||||
0:45 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:45 'oColor' ( smooth out highp 4-component vector of float)
|
||||
0:45 component-wise multiply ( temp highp 4-component vector of float)
|
||||
0:45 component-wise multiply ( temp highp 4-component vector of float)
|
||||
0:45 color1: direct index for structure (layout( column_major std140 offset=0) uniform highp 4-component vector of float)
|
||||
0:45 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:45 Constant:
|
||||
0:45 0 (const int)
|
||||
0:45 Function Call: getColor2( ( global highp 4-component vector of float)
|
||||
0:45 c: direct index for structure (layout( column_major std430 offset=0) buffer highp 4-component vector of float)
|
||||
0:45 'uColorBuf' (layout( binding=0 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4-component vector of float c})
|
||||
0:45 Constant:
|
||||
0:45 0 (const int)
|
||||
0:46 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:46 v1: direct index for structure ( out highp 4-component vector of float)
|
||||
0:46 'oV' ( out block{ out highp 4-component vector of float v1, out highp 4-component vector of float v2})
|
||||
0:46 Constant:
|
||||
0:46 0 (const int)
|
||||
0:46 color1: direct index for structure (layout( column_major std140 offset=0) uniform highp 4-component vector of float)
|
||||
0:46 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:46 Constant:
|
||||
0:46 0 (const int)
|
||||
0:48 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:48 gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
|
||||
0:48 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||
0:48 Constant:
|
||||
0:48 0 (const uint)
|
||||
0:48 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:48 uProj: direct index for structure (layout( column_major std140 offset=0) uniform highp 4X4 matrix of float)
|
||||
0:48 'uM' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:48 Constant:
|
||||
0:48 0 (const int)
|
||||
0:48 Function Call: getWorld( ( global highp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'uM' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:? 'oV' ( out block{ out highp 4-component vector of float v1, out highp 4-component vector of float v2})
|
||||
0:? 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:? 'uBuf' (layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4X4 matrix of float p})
|
||||
0:? 'uColorBuf' (layout( binding=0 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4-component vector of float c})
|
||||
0:? 'oColor' ( smooth out highp 4-component vector of float)
|
||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||
|
||||
link.vk.multiBlocksValid.0.1.vert
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:36 Function Definition: getColor2( ( global highp 4-component vector of float)
|
||||
0:36 Function Parameters:
|
||||
0:38 Sequence
|
||||
0:38 Branch: Return with expression
|
||||
0:38 color2: direct index for structure (layout( column_major std140 offset=32) uniform highp 4-component vector of float)
|
||||
0:38 'uColor' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:38 Constant:
|
||||
0:38 2 (const int)
|
||||
0:41 Function Definition: getWorld( ( global highp 4-component vector of float)
|
||||
0:41 Function Parameters:
|
||||
0:43 Sequence
|
||||
0:43 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:43 v1: direct index for structure ( out highp 4-component vector of float)
|
||||
0:43 'anon@0' ( out block{ out highp 4-component vector of float v1, out highp 4-component vector of float v2})
|
||||
0:43 Constant:
|
||||
0:43 0 (const uint)
|
||||
0:43 Constant:
|
||||
0:43 1.000000
|
||||
0:43 1.000000
|
||||
0:43 1.000000
|
||||
0:43 1.000000
|
||||
0:44 Branch: Return with expression
|
||||
0:44 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:44 uWorld: direct index for structure (layout( column_major std140 offset=64) uniform highp 4X4 matrix of float)
|
||||
0:44 'uMatrix' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:44 Constant:
|
||||
0:44 1 (const int)
|
||||
0:44 'P' ( in highp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'uColor' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:? 'uBuffer' (layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4X4 matrix of float p})
|
||||
0:? 'uMatrix' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:? 'anon@0' ( out block{ out highp 4-component vector of float v1, out highp 4-component vector of float v2})
|
||||
0:? 'P' ( in highp 4-component vector of float)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
uC: "layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3}" versus uColor: "layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3}"
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
uBuf: "layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4X4 matrix of float p}" versus uBuffer: "layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4X4 matrix of float p}"
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
uM: "layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld}" versus uMatrix: "layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld}"
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
oV: " out block{ out highp 4-component vector of float v1, out highp 4-component vector of float v2}" versus anon@0: " out block{ out highp 4-component vector of float v1, out highp 4-component vector of float v2}"
|
||||
|
||||
Shader version: 430
|
||||
0:? Sequence
|
||||
0:43 Function Definition: main( ( global void)
|
||||
0:43 Function Parameters:
|
||||
0:45 Sequence
|
||||
0:45 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:45 'oColor' ( smooth out highp 4-component vector of float)
|
||||
0:45 component-wise multiply ( temp highp 4-component vector of float)
|
||||
0:45 component-wise multiply ( temp highp 4-component vector of float)
|
||||
0:45 color1: direct index for structure (layout( column_major std140 offset=0) uniform highp 4-component vector of float)
|
||||
0:45 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:45 Constant:
|
||||
0:45 0 (const int)
|
||||
0:45 Function Call: getColor2( ( global highp 4-component vector of float)
|
||||
0:45 c: direct index for structure (layout( column_major std430 offset=0) buffer highp 4-component vector of float)
|
||||
0:45 'uColorBuf' (layout( binding=0 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4-component vector of float c})
|
||||
0:45 Constant:
|
||||
0:45 0 (const int)
|
||||
0:46 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:46 v1: direct index for structure ( out highp 4-component vector of float)
|
||||
0:46 'oV' ( out block{ out highp 4-component vector of float v1, out highp 4-component vector of float v2})
|
||||
0:46 Constant:
|
||||
0:46 0 (const int)
|
||||
0:46 color1: direct index for structure (layout( column_major std140 offset=0) uniform highp 4-component vector of float)
|
||||
0:46 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:46 Constant:
|
||||
0:46 0 (const int)
|
||||
0:48 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:48 gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
|
||||
0:48 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||
0:48 Constant:
|
||||
0:48 0 (const uint)
|
||||
0:48 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:48 uProj: direct index for structure (layout( column_major std140 offset=0) uniform highp 4X4 matrix of float)
|
||||
0:48 'uM' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:48 Constant:
|
||||
0:48 0 (const int)
|
||||
0:48 Function Call: getWorld( ( global highp 4-component vector of float)
|
||||
0:36 Function Definition: getColor2( ( global highp 4-component vector of float)
|
||||
0:36 Function Parameters:
|
||||
0:38 Sequence
|
||||
0:38 Branch: Return with expression
|
||||
0:38 color2: direct index for structure (layout( column_major std140 offset=32) uniform highp 4-component vector of float)
|
||||
0:38 'uColor' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:38 Constant:
|
||||
0:38 2 (const int)
|
||||
0:41 Function Definition: getWorld( ( global highp 4-component vector of float)
|
||||
0:41 Function Parameters:
|
||||
0:43 Sequence
|
||||
0:43 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:43 v1: direct index for structure ( out highp 4-component vector of float)
|
||||
0:43 'anon@0' ( out block{ out highp 4-component vector of float v1, out highp 4-component vector of float v2})
|
||||
0:43 Constant:
|
||||
0:43 0 (const uint)
|
||||
0:43 Constant:
|
||||
0:43 1.000000
|
||||
0:43 1.000000
|
||||
0:43 1.000000
|
||||
0:43 1.000000
|
||||
0:44 Branch: Return with expression
|
||||
0:44 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:44 uWorld: direct index for structure (layout( column_major std140 offset=64) uniform highp 4X4 matrix of float)
|
||||
0:44 'uMatrix' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:44 Constant:
|
||||
0:44 1 (const int)
|
||||
0:44 'P' ( in highp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'uM' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:? 'oV' ( out block{ out highp 4-component vector of float v1, out highp 4-component vector of float v2})
|
||||
0:? 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:? 'uBuf' (layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4X4 matrix of float p})
|
||||
0:? 'uColorBuf' (layout( binding=0 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4-component vector of float c})
|
||||
0:? 'oColor' ( smooth out highp 4-component vector of float)
|
||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||
0:? 'P' ( in highp 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 73
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 14 34 42 65
|
||||
Source GLSL 430
|
||||
Name 4 "main"
|
||||
Name 9 "getColor2("
|
||||
Name 11 "getWorld("
|
||||
Name 14 "oColor"
|
||||
Name 16 "ColorBlock"
|
||||
MemberName 16(ColorBlock) 0 "color1"
|
||||
MemberName 16(ColorBlock) 1 "b"
|
||||
MemberName 16(ColorBlock) 2 "color2"
|
||||
MemberName 16(ColorBlock) 3 "color3"
|
||||
Name 18 "uC"
|
||||
Name 26 "SecondaryColorBlock"
|
||||
MemberName 26(SecondaryColorBlock) 0 "c"
|
||||
Name 28 "uColorBuf"
|
||||
Name 32 "Vertex"
|
||||
MemberName 32(Vertex) 0 "v1"
|
||||
MemberName 32(Vertex) 1 "v2"
|
||||
Name 34 "oV"
|
||||
Name 40 "gl_PerVertex"
|
||||
MemberName 40(gl_PerVertex) 0 "gl_Position"
|
||||
MemberName 40(gl_PerVertex) 1 "gl_PointSize"
|
||||
MemberName 40(gl_PerVertex) 2 "gl_ClipDistance"
|
||||
Name 42 ""
|
||||
Name 44 "MatrixBlock"
|
||||
MemberName 44(MatrixBlock) 0 "uProj"
|
||||
MemberName 44(MatrixBlock) 1 "uWorld"
|
||||
Name 46 "uM"
|
||||
Name 65 "P"
|
||||
Name 70 "BufferBlock"
|
||||
MemberName 70(BufferBlock) 0 "p"
|
||||
Name 72 "uBuf"
|
||||
MemberDecorate 16(ColorBlock) 0 Offset 0
|
||||
MemberDecorate 16(ColorBlock) 1 Offset 16
|
||||
MemberDecorate 16(ColorBlock) 2 Offset 32
|
||||
MemberDecorate 16(ColorBlock) 3 Offset 48
|
||||
Decorate 16(ColorBlock) Block
|
||||
Decorate 18(uC) DescriptorSet 0
|
||||
Decorate 18(uC) Binding 1
|
||||
MemberDecorate 26(SecondaryColorBlock) 0 Offset 0
|
||||
Decorate 26(SecondaryColorBlock) BufferBlock
|
||||
Decorate 28(uColorBuf) DescriptorSet 0
|
||||
Decorate 28(uColorBuf) Binding 0
|
||||
Decorate 32(Vertex) Block
|
||||
MemberDecorate 40(gl_PerVertex) 0 BuiltIn Position
|
||||
MemberDecorate 40(gl_PerVertex) 1 BuiltIn PointSize
|
||||
MemberDecorate 40(gl_PerVertex) 2 BuiltIn ClipDistance
|
||||
Decorate 40(gl_PerVertex) Block
|
||||
MemberDecorate 44(MatrixBlock) 0 ColMajor
|
||||
MemberDecorate 44(MatrixBlock) 0 Offset 0
|
||||
MemberDecorate 44(MatrixBlock) 0 MatrixStride 16
|
||||
MemberDecorate 44(MatrixBlock) 1 ColMajor
|
||||
MemberDecorate 44(MatrixBlock) 1 Offset 64
|
||||
MemberDecorate 44(MatrixBlock) 1 MatrixStride 16
|
||||
Decorate 44(MatrixBlock) Block
|
||||
Decorate 46(uM) DescriptorSet 0
|
||||
Decorate 46(uM) Binding 0
|
||||
MemberDecorate 70(BufferBlock) 0 ColMajor
|
||||
MemberDecorate 70(BufferBlock) 0 Offset 0
|
||||
MemberDecorate 70(BufferBlock) 0 MatrixStride 16
|
||||
Decorate 70(BufferBlock) BufferBlock
|
||||
Decorate 72(uBuf) DescriptorSet 0
|
||||
Decorate 72(uBuf) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypeFunction 7(fvec4)
|
||||
13: TypePointer Output 7(fvec4)
|
||||
14(oColor): 13(ptr) Variable Output
|
||||
15: TypeInt 32 0
|
||||
16(ColorBlock): TypeStruct 7(fvec4) 15(int) 7(fvec4) 7(fvec4)
|
||||
17: TypePointer Uniform 16(ColorBlock)
|
||||
18(uC): 17(ptr) Variable Uniform
|
||||
19: TypeInt 32 1
|
||||
20: 19(int) Constant 0
|
||||
21: TypePointer Uniform 7(fvec4)
|
||||
26(SecondaryColorBlock): TypeStruct 7(fvec4)
|
||||
27: TypePointer Uniform 26(SecondaryColorBlock)
|
||||
28(uColorBuf): 27(ptr) Variable Uniform
|
||||
32(Vertex): TypeStruct 7(fvec4) 7(fvec4)
|
||||
33: TypePointer Output 32(Vertex)
|
||||
34(oV): 33(ptr) Variable Output
|
||||
38: 15(int) Constant 1
|
||||
39: TypeArray 6(float) 38
|
||||
40(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 39
|
||||
41: TypePointer Output 40(gl_PerVertex)
|
||||
42: 41(ptr) Variable Output
|
||||
43: TypeMatrix 7(fvec4) 4
|
||||
44(MatrixBlock): TypeStruct 43 43
|
||||
45: TypePointer Uniform 44(MatrixBlock)
|
||||
46(uM): 45(ptr) Variable Uniform
|
||||
47: TypePointer Uniform 43
|
||||
53: 19(int) Constant 2
|
||||
58: 6(float) Constant 1065353216
|
||||
59: 7(fvec4) ConstantComposite 58 58 58 58
|
||||
61: 19(int) Constant 1
|
||||
64: TypePointer Input 7(fvec4)
|
||||
65(P): 64(ptr) Variable Input
|
||||
70(BufferBlock): TypeStruct 43
|
||||
71: TypePointer Uniform 70(BufferBlock)
|
||||
72(uBuf): 71(ptr) Variable Uniform
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
22: 21(ptr) AccessChain 18(uC) 20
|
||||
23: 7(fvec4) Load 22
|
||||
24: 7(fvec4) FunctionCall 9(getColor2()
|
||||
25: 7(fvec4) FMul 23 24
|
||||
29: 21(ptr) AccessChain 28(uColorBuf) 20
|
||||
30: 7(fvec4) Load 29
|
||||
31: 7(fvec4) FMul 25 30
|
||||
Store 14(oColor) 31
|
||||
35: 21(ptr) AccessChain 18(uC) 20
|
||||
36: 7(fvec4) Load 35
|
||||
37: 13(ptr) AccessChain 34(oV) 20
|
||||
Store 37 36
|
||||
48: 47(ptr) AccessChain 46(uM) 20
|
||||
49: 43 Load 48
|
||||
50: 7(fvec4) FunctionCall 11(getWorld()
|
||||
51: 7(fvec4) MatrixTimesVector 49 50
|
||||
52: 13(ptr) AccessChain 42 20
|
||||
Store 52 51
|
||||
Return
|
||||
FunctionEnd
|
||||
9(getColor2(): 7(fvec4) Function None 8
|
||||
10: Label
|
||||
54: 21(ptr) AccessChain 18(uC) 53
|
||||
55: 7(fvec4) Load 54
|
||||
ReturnValue 55
|
||||
FunctionEnd
|
||||
11(getWorld(): 7(fvec4) Function None 8
|
||||
12: Label
|
||||
60: 13(ptr) AccessChain 34(oV) 20
|
||||
Store 60 59
|
||||
62: 47(ptr) AccessChain 46(uM) 61
|
||||
63: 43 Load 62
|
||||
66: 7(fvec4) Load 65(P)
|
||||
67: 7(fvec4) MatrixTimesVector 63 66
|
||||
ReturnValue 67
|
||||
FunctionEnd
|
451
Test/baseResults/link.vk.multiBlocksValid.1.0.geom.out
Executable file
451
Test/baseResults/link.vk.multiBlocksValid.1.0.geom.out
Executable file
@ -0,0 +1,451 @@
|
||||
link.vk.multiBlocksValid.1.0.geom
|
||||
Shader version: 430
|
||||
invocations = -1
|
||||
max_vertices = 3
|
||||
input primitive = triangles
|
||||
output primitive = triangle_strip
|
||||
0:? Sequence
|
||||
0:48 Function Definition: main( ( global void)
|
||||
0:48 Function Parameters:
|
||||
0:50 Sequence
|
||||
0:50 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:50 'oColor' (layout( stream=0) out highp 4-component vector of float)
|
||||
0:50 component-wise multiply ( temp highp 4-component vector of float)
|
||||
0:50 color1: direct index for structure (layout( column_major std140 offset=0) uniform highp 4-component vector of float)
|
||||
0:50 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:50 Constant:
|
||||
0:50 0 (const int)
|
||||
0:50 Function Call: getColor2( ( global highp 4-component vector of float)
|
||||
0:52 move second child to first child ( temp highp float)
|
||||
0:52 'globalF' ( global highp float)
|
||||
0:52 Constant:
|
||||
0:52 1.000000
|
||||
0:54 Sequence
|
||||
0:54 Sequence
|
||||
0:54 move second child to first child ( temp highp int)
|
||||
0:54 'i' ( temp highp int)
|
||||
0:54 Constant:
|
||||
0:54 0 (const int)
|
||||
0:54 Loop with condition tested first
|
||||
0:54 Loop Condition
|
||||
0:54 Compare Less Than ( temp bool)
|
||||
0:54 'i' ( temp highp int)
|
||||
0:54 Constant:
|
||||
0:54 3 (const int)
|
||||
0:54 Loop Body
|
||||
0:56 Sequence
|
||||
0:56 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:56 gl_Position: direct index for structure (layout( stream=0) gl_Position highp 4-component vector of float Position)
|
||||
0:56 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||
0:56 Constant:
|
||||
0:56 0 (const uint)
|
||||
0:56 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:56 uProj: direct index for structure (layout( column_major std140 offset=0) uniform highp 4X4 matrix of float)
|
||||
0:56 'uM' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:56 Constant:
|
||||
0:56 0 (const int)
|
||||
0:56 Function Call: getWorld(i1; ( global highp 4-component vector of float)
|
||||
0:56 'i' ( temp highp int)
|
||||
0:57 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:57 val1: direct index for structure (layout( stream=0) out highp 4-component vector of float)
|
||||
0:57 'oV' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float val1})
|
||||
0:57 Constant:
|
||||
0:57 0 (const int)
|
||||
0:57 add ( temp highp 4-component vector of float)
|
||||
0:57 color1: direct index for structure (layout( column_major std140 offset=0) uniform highp 4-component vector of float)
|
||||
0:57 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:57 Constant:
|
||||
0:57 0 (const int)
|
||||
0:57 vector-scale ( temp highp 4-component vector of float)
|
||||
0:57 v2: direct index for structure ( in highp 4-component vector of float)
|
||||
0:57 indirect index ( temp block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:57 'iV' ( in 3-element array of block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:57 'i' ( temp highp int)
|
||||
0:57 Constant:
|
||||
0:57 1 (const int)
|
||||
0:57 'globalF' ( global highp float)
|
||||
0:58 EmitVertex ( global void)
|
||||
0:54 Loop Terminal Expression
|
||||
0:54 Post-Increment ( temp highp int)
|
||||
0:54 'i' ( temp highp int)
|
||||
0:61 EndPrimitive ( global void)
|
||||
0:? Linker Objects
|
||||
0:? 'uM' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:? 'iV' ( in 3-element array of block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:? 'oV' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float val1})
|
||||
0:? 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:? 'uBuf' (layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4X4 matrix of float p})
|
||||
0:? 'oColor' (layout( stream=0) out highp 4-component vector of float)
|
||||
0:? 'globalF' ( global highp float)
|
||||
0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||
|
||||
link.vk.multiBlocksValid.1.1.geom
|
||||
Shader version: 430
|
||||
invocations = -1
|
||||
max_vertices = 3
|
||||
input primitive = triangles
|
||||
output primitive = triangle_strip
|
||||
0:? Sequence
|
||||
0:44 Function Definition: getColor2( ( global highp 4-component vector of float)
|
||||
0:44 Function Parameters:
|
||||
0:46 Sequence
|
||||
0:46 Branch: Return with expression
|
||||
0:46 color2: direct index for structure (layout( column_major std140 offset=32) uniform highp 4-component vector of float)
|
||||
0:46 'uColor' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:46 Constant:
|
||||
0:46 2 (const int)
|
||||
0:49 Function Definition: getWorld(i1; ( global highp 4-component vector of float)
|
||||
0:49 Function Parameters:
|
||||
0:49 'i' ( in highp int)
|
||||
0:51 Sequence
|
||||
0:51 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:51 val1: direct index for structure (layout( stream=0) out highp 4-component vector of float)
|
||||
0:51 'anon@0' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float val1})
|
||||
0:51 Constant:
|
||||
0:51 0 (const uint)
|
||||
0:51 Constant:
|
||||
0:51 1.000000
|
||||
0:51 1.000000
|
||||
0:51 1.000000
|
||||
0:51 1.000000
|
||||
0:52 Branch: Return with expression
|
||||
0:52 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:52 uWorld: direct index for structure (layout( column_major std140 offset=64) uniform highp 4X4 matrix of float)
|
||||
0:52 'uMatrix' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:52 Constant:
|
||||
0:52 1 (const int)
|
||||
0:52 v1: direct index for structure ( in highp 4-component vector of float)
|
||||
0:52 indirect index ( temp block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:52 'iVV' ( in 3-element array of block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:52 'i' ( in highp int)
|
||||
0:52 Constant:
|
||||
0:52 0 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'uColor' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:? 'uBuffer' (layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4X4 matrix of float p})
|
||||
0:? 'uMatrix' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float val1})
|
||||
0:? 'iVV' ( in 3-element array of block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:? 'P' ( in 3-element array of highp 4-component vector of float)
|
||||
|
||||
|
||||
Linked geometry stage:
|
||||
|
||||
WARNING: Linking geometry stage: Matched shader interfaces are using different instance names.
|
||||
uC: "layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3}" versus uColor: "layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3}"
|
||||
WARNING: Linking geometry stage: Matched shader interfaces are using different instance names.
|
||||
uBuf: "layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4X4 matrix of float p}" versus uBuffer: "layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4X4 matrix of float p}"
|
||||
WARNING: Linking geometry stage: Matched shader interfaces are using different instance names.
|
||||
uM: "layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld}" versus uMatrix: "layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld}"
|
||||
WARNING: Linking geometry stage: Matched shader interfaces are using different instance names.
|
||||
oV: "layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float val1}" versus anon@0: "layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float val1}"
|
||||
WARNING: Linking geometry stage: Matched shader interfaces are using different instance names.
|
||||
iV: " in 3-element array of block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2}" versus iVV: " in 3-element array of block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2}"
|
||||
|
||||
Shader version: 430
|
||||
invocations = 1
|
||||
max_vertices = 3
|
||||
input primitive = triangles
|
||||
output primitive = triangle_strip
|
||||
0:? Sequence
|
||||
0:48 Function Definition: main( ( global void)
|
||||
0:48 Function Parameters:
|
||||
0:50 Sequence
|
||||
0:50 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:50 'oColor' (layout( stream=0) out highp 4-component vector of float)
|
||||
0:50 component-wise multiply ( temp highp 4-component vector of float)
|
||||
0:50 color1: direct index for structure (layout( column_major std140 offset=0) uniform highp 4-component vector of float)
|
||||
0:50 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:50 Constant:
|
||||
0:50 0 (const int)
|
||||
0:50 Function Call: getColor2( ( global highp 4-component vector of float)
|
||||
0:52 move second child to first child ( temp highp float)
|
||||
0:52 'globalF' ( global highp float)
|
||||
0:52 Constant:
|
||||
0:52 1.000000
|
||||
0:54 Sequence
|
||||
0:54 Sequence
|
||||
0:54 move second child to first child ( temp highp int)
|
||||
0:54 'i' ( temp highp int)
|
||||
0:54 Constant:
|
||||
0:54 0 (const int)
|
||||
0:54 Loop with condition tested first
|
||||
0:54 Loop Condition
|
||||
0:54 Compare Less Than ( temp bool)
|
||||
0:54 'i' ( temp highp int)
|
||||
0:54 Constant:
|
||||
0:54 3 (const int)
|
||||
0:54 Loop Body
|
||||
0:56 Sequence
|
||||
0:56 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:56 gl_Position: direct index for structure (layout( stream=0) gl_Position highp 4-component vector of float Position)
|
||||
0:56 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance})
|
||||
0:56 Constant:
|
||||
0:56 0 (const uint)
|
||||
0:56 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:56 uProj: direct index for structure (layout( column_major std140 offset=0) uniform highp 4X4 matrix of float)
|
||||
0:56 'uM' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:56 Constant:
|
||||
0:56 0 (const int)
|
||||
0:56 Function Call: getWorld(i1; ( global highp 4-component vector of float)
|
||||
0:56 'i' ( temp highp int)
|
||||
0:57 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:57 val1: direct index for structure (layout( stream=0) out highp 4-component vector of float)
|
||||
0:57 'oV' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float val1})
|
||||
0:57 Constant:
|
||||
0:57 0 (const int)
|
||||
0:57 add ( temp highp 4-component vector of float)
|
||||
0:57 color1: direct index for structure (layout( column_major std140 offset=0) uniform highp 4-component vector of float)
|
||||
0:57 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:57 Constant:
|
||||
0:57 0 (const int)
|
||||
0:57 vector-scale ( temp highp 4-component vector of float)
|
||||
0:57 v2: direct index for structure ( in highp 4-component vector of float)
|
||||
0:57 indirect index ( temp block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:57 'iV' ( in 3-element array of block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:57 'i' ( temp highp int)
|
||||
0:57 Constant:
|
||||
0:57 1 (const int)
|
||||
0:57 'globalF' ( global highp float)
|
||||
0:58 EmitVertex ( global void)
|
||||
0:54 Loop Terminal Expression
|
||||
0:54 Post-Increment ( temp highp int)
|
||||
0:54 'i' ( temp highp int)
|
||||
0:61 EndPrimitive ( global void)
|
||||
0:44 Function Definition: getColor2( ( global highp 4-component vector of float)
|
||||
0:44 Function Parameters:
|
||||
0:46 Sequence
|
||||
0:46 Branch: Return with expression
|
||||
0:46 color2: direct index for structure (layout( column_major std140 offset=32) uniform highp 4-component vector of float)
|
||||
0:46 'uColor' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:46 Constant:
|
||||
0:46 2 (const int)
|
||||
0:49 Function Definition: getWorld(i1; ( global highp 4-component vector of float)
|
||||
0:49 Function Parameters:
|
||||
0:49 'i' ( in highp int)
|
||||
0:51 Sequence
|
||||
0:51 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:51 val1: direct index for structure (layout( stream=0) out highp 4-component vector of float)
|
||||
0:51 'anon@0' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float val1})
|
||||
0:51 Constant:
|
||||
0:51 0 (const uint)
|
||||
0:51 Constant:
|
||||
0:51 1.000000
|
||||
0:51 1.000000
|
||||
0:51 1.000000
|
||||
0:51 1.000000
|
||||
0:52 Branch: Return with expression
|
||||
0:52 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:52 uWorld: direct index for structure (layout( column_major std140 offset=64) uniform highp 4X4 matrix of float)
|
||||
0:52 'uMatrix' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:52 Constant:
|
||||
0:52 1 (const int)
|
||||
0:52 v1: direct index for structure ( in highp 4-component vector of float)
|
||||
0:52 indirect index ( temp block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:52 'iVV' ( in 3-element array of block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:52 'i' ( in highp int)
|
||||
0:52 Constant:
|
||||
0:52 0 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'uM' (layout( binding=0 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4X4 matrix of float uProj, layout( column_major std140 offset=64) uniform highp 4X4 matrix of float uWorld})
|
||||
0:? 'iV' ( in 3-element array of block{ in highp 4-component vector of float v1, in highp 4-component vector of float v2})
|
||||
0:? 'oV' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float val1})
|
||||
0:? 'uC' (layout( binding=1 column_major std140) uniform block{layout( column_major std140 offset=0) uniform highp 4-component vector of float color1, layout( column_major std140 offset=16) uniform bool b, layout( column_major std140 offset=32) uniform highp 4-component vector of float color2, layout( column_major std140 offset=48) uniform highp 4-component vector of float color3})
|
||||
0:? 'uBuf' (layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer highp 4X4 matrix of float p})
|
||||
0:? 'oColor' (layout( stream=0) out highp 4-component vector of float)
|
||||
0:? 'globalF' ( global highp float)
|
||||
0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance})
|
||||
0:? 'P' ( in 3-element array of highp 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 101
|
||||
|
||||
Capability Geometry
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Geometry 4 "main" 18 46 61 68 100
|
||||
ExecutionMode 4 Triangles
|
||||
ExecutionMode 4 Invocations 1
|
||||
ExecutionMode 4 OutputTriangleStrip
|
||||
ExecutionMode 4 OutputVertices 3
|
||||
Source GLSL 430
|
||||
Name 4 "main"
|
||||
Name 9 "getColor2("
|
||||
Name 15 "getWorld(i1;"
|
||||
Name 14 "i"
|
||||
Name 18 "oColor"
|
||||
Name 20 "ColorBlock"
|
||||
MemberName 20(ColorBlock) 0 "color1"
|
||||
MemberName 20(ColorBlock) 1 "b"
|
||||
MemberName 20(ColorBlock) 2 "color2"
|
||||
MemberName 20(ColorBlock) 3 "color3"
|
||||
Name 22 "uC"
|
||||
Name 30 "globalF"
|
||||
Name 32 "i"
|
||||
Name 44 "gl_PerVertex"
|
||||
MemberName 44(gl_PerVertex) 0 "gl_Position"
|
||||
MemberName 44(gl_PerVertex) 1 "gl_PointSize"
|
||||
MemberName 44(gl_PerVertex) 2 "gl_ClipDistance"
|
||||
Name 46 ""
|
||||
Name 48 "MatrixBlock"
|
||||
MemberName 48(MatrixBlock) 0 "uProj"
|
||||
MemberName 48(MatrixBlock) 1 "uWorld"
|
||||
Name 50 "uM"
|
||||
Name 54 "param"
|
||||
Name 59 "Vertex"
|
||||
MemberName 59(Vertex) 0 "val1"
|
||||
Name 61 "oV"
|
||||
Name 64 "Vertex"
|
||||
MemberName 64(Vertex) 0 "v1"
|
||||
MemberName 64(Vertex) 1 "v2"
|
||||
Name 68 "iV"
|
||||
Name 95 "BufferBlock"
|
||||
MemberName 95(BufferBlock) 0 "p"
|
||||
Name 97 "uBuf"
|
||||
Name 100 "P"
|
||||
MemberDecorate 20(ColorBlock) 0 Offset 0
|
||||
MemberDecorate 20(ColorBlock) 1 Offset 16
|
||||
MemberDecorate 20(ColorBlock) 2 Offset 32
|
||||
MemberDecorate 20(ColorBlock) 3 Offset 48
|
||||
Decorate 20(ColorBlock) Block
|
||||
Decorate 22(uC) DescriptorSet 0
|
||||
Decorate 22(uC) Binding 1
|
||||
MemberDecorate 44(gl_PerVertex) 0 BuiltIn Position
|
||||
MemberDecorate 44(gl_PerVertex) 1 BuiltIn PointSize
|
||||
MemberDecorate 44(gl_PerVertex) 2 BuiltIn ClipDistance
|
||||
Decorate 44(gl_PerVertex) Block
|
||||
MemberDecorate 48(MatrixBlock) 0 ColMajor
|
||||
MemberDecorate 48(MatrixBlock) 0 Offset 0
|
||||
MemberDecorate 48(MatrixBlock) 0 MatrixStride 16
|
||||
MemberDecorate 48(MatrixBlock) 1 ColMajor
|
||||
MemberDecorate 48(MatrixBlock) 1 Offset 64
|
||||
MemberDecorate 48(MatrixBlock) 1 MatrixStride 16
|
||||
Decorate 48(MatrixBlock) Block
|
||||
Decorate 50(uM) DescriptorSet 0
|
||||
Decorate 50(uM) Binding 0
|
||||
Decorate 59(Vertex) Block
|
||||
Decorate 64(Vertex) Block
|
||||
MemberDecorate 95(BufferBlock) 0 ColMajor
|
||||
MemberDecorate 95(BufferBlock) 0 Offset 0
|
||||
MemberDecorate 95(BufferBlock) 0 MatrixStride 16
|
||||
Decorate 95(BufferBlock) BufferBlock
|
||||
Decorate 97(uBuf) DescriptorSet 0
|
||||
Decorate 97(uBuf) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypeFunction 7(fvec4)
|
||||
11: TypeInt 32 1
|
||||
12: TypePointer Function 11(int)
|
||||
13: TypeFunction 7(fvec4) 12(ptr)
|
||||
17: TypePointer Output 7(fvec4)
|
||||
18(oColor): 17(ptr) Variable Output
|
||||
19: TypeInt 32 0
|
||||
20(ColorBlock): TypeStruct 7(fvec4) 19(int) 7(fvec4) 7(fvec4)
|
||||
21: TypePointer Uniform 20(ColorBlock)
|
||||
22(uC): 21(ptr) Variable Uniform
|
||||
23: 11(int) Constant 0
|
||||
24: TypePointer Uniform 7(fvec4)
|
||||
29: TypePointer Private 6(float)
|
||||
30(globalF): 29(ptr) Variable Private
|
||||
31: 6(float) Constant 1065353216
|
||||
39: 11(int) Constant 3
|
||||
40: TypeBool
|
||||
42: 19(int) Constant 1
|
||||
43: TypeArray 6(float) 42
|
||||
44(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 43
|
||||
45: TypePointer Output 44(gl_PerVertex)
|
||||
46: 45(ptr) Variable Output
|
||||
47: TypeMatrix 7(fvec4) 4
|
||||
48(MatrixBlock): TypeStruct 47 47
|
||||
49: TypePointer Uniform 48(MatrixBlock)
|
||||
50(uM): 49(ptr) Variable Uniform
|
||||
51: TypePointer Uniform 47
|
||||
59(Vertex): TypeStruct 7(fvec4)
|
||||
60: TypePointer Output 59(Vertex)
|
||||
61(oV): 60(ptr) Variable Output
|
||||
64(Vertex): TypeStruct 7(fvec4) 7(fvec4)
|
||||
65: 19(int) Constant 3
|
||||
66: TypeArray 64(Vertex) 65
|
||||
67: TypePointer Input 66
|
||||
68(iV): 67(ptr) Variable Input
|
||||
70: 11(int) Constant 1
|
||||
71: TypePointer Input 7(fvec4)
|
||||
80: 11(int) Constant 2
|
||||
85: 7(fvec4) ConstantComposite 31 31 31 31
|
||||
95(BufferBlock): TypeStruct 47
|
||||
96: TypePointer Uniform 95(BufferBlock)
|
||||
97(uBuf): 96(ptr) Variable Uniform
|
||||
98: TypeArray 7(fvec4) 65
|
||||
99: TypePointer Input 98
|
||||
100(P): 99(ptr) Variable Input
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
32(i): 12(ptr) Variable Function
|
||||
54(param): 12(ptr) Variable Function
|
||||
25: 24(ptr) AccessChain 22(uC) 23
|
||||
26: 7(fvec4) Load 25
|
||||
27: 7(fvec4) FunctionCall 9(getColor2()
|
||||
28: 7(fvec4) FMul 26 27
|
||||
Store 18(oColor) 28
|
||||
Store 30(globalF) 31
|
||||
Store 32(i) 23
|
||||
Branch 33
|
||||
33: Label
|
||||
LoopMerge 35 36 None
|
||||
Branch 37
|
||||
37: Label
|
||||
38: 11(int) Load 32(i)
|
||||
41: 40(bool) SLessThan 38 39
|
||||
BranchConditional 41 34 35
|
||||
34: Label
|
||||
52: 51(ptr) AccessChain 50(uM) 23
|
||||
53: 47 Load 52
|
||||
55: 11(int) Load 32(i)
|
||||
Store 54(param) 55
|
||||
56: 7(fvec4) FunctionCall 15(getWorld(i1;) 54(param)
|
||||
57: 7(fvec4) MatrixTimesVector 53 56
|
||||
58: 17(ptr) AccessChain 46 23
|
||||
Store 58 57
|
||||
62: 24(ptr) AccessChain 22(uC) 23
|
||||
63: 7(fvec4) Load 62
|
||||
69: 11(int) Load 32(i)
|
||||
72: 71(ptr) AccessChain 68(iV) 69 70
|
||||
73: 7(fvec4) Load 72
|
||||
74: 6(float) Load 30(globalF)
|
||||
75: 7(fvec4) VectorTimesScalar 73 74
|
||||
76: 7(fvec4) FAdd 63 75
|
||||
77: 17(ptr) AccessChain 61(oV) 23
|
||||
Store 77 76
|
||||
EmitVertex
|
||||
Branch 36
|
||||
36: Label
|
||||
78: 11(int) Load 32(i)
|
||||
79: 11(int) IAdd 78 70
|
||||
Store 32(i) 79
|
||||
Branch 33
|
||||
35: Label
|
||||
EndPrimitive
|
||||
Return
|
||||
FunctionEnd
|
||||
9(getColor2(): 7(fvec4) Function None 8
|
||||
10: Label
|
||||
81: 24(ptr) AccessChain 22(uC) 80
|
||||
82: 7(fvec4) Load 81
|
||||
ReturnValue 82
|
||||
FunctionEnd
|
||||
15(getWorld(i1;): 7(fvec4) Function None 13
|
||||
14(i): 12(ptr) FunctionParameter
|
||||
16: Label
|
||||
86: 17(ptr) AccessChain 61(oV) 23
|
||||
Store 86 85
|
||||
87: 51(ptr) AccessChain 50(uM) 70
|
||||
88: 47 Load 87
|
||||
89: 11(int) Load 14(i)
|
||||
90: 71(ptr) AccessChain 68(iV) 89 23
|
||||
91: 7(fvec4) Load 90
|
||||
92: 7(fvec4) MatrixTimesVector 88 91
|
||||
ReturnValue 92
|
||||
FunctionEnd
|
111
Test/baseResults/link.vk.pcNamingInvalid.0.0.vert.out
Executable file
111
Test/baseResults/link.vk.pcNamingInvalid.0.0.vert.out
Executable file
@ -0,0 +1,111 @@
|
||||
link.vk.pcNamingInvalid.0.0.vert
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:16 Function Definition: main( ( global void)
|
||||
0:16 Function Parameters:
|
||||
0:18 Sequence
|
||||
0:18 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:18 'oColor' ( smooth out highp 4-component vector of float)
|
||||
0:18 component-wise multiply ( temp highp 4-component vector of float)
|
||||
0:18 color1: direct index for structure (layout( column_major std430 offset=128) uniform highp 4-component vector of float)
|
||||
0:18 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:18 Constant:
|
||||
0:18 2 (const int)
|
||||
0:18 Function Call: getColor2( ( global highp 4-component vector of float)
|
||||
0:20 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:20 gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
|
||||
0:20 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, out unsized 1-element array of float CullDistance gl_CullDistance})
|
||||
0:20 Constant:
|
||||
0:20 0 (const uint)
|
||||
0:20 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:20 uProj: direct index for structure (layout( column_major std430 offset=64) uniform highp 4X4 matrix of float)
|
||||
0:20 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:20 Constant:
|
||||
0:20 1 (const int)
|
||||
0:20 Function Call: getWorld( ( global highp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:? 'oColor' ( smooth out highp 4-component vector of float)
|
||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, out unsized 1-element array of float CullDistance gl_CullDistance})
|
||||
|
||||
link.vk.pcNamingInvalid.0.1.vert
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:13 Function Definition: getColor2( ( global highp 4-component vector of float)
|
||||
0:13 Function Parameters:
|
||||
0:15 Sequence
|
||||
0:15 Branch: Return with expression
|
||||
0:15 color2: direct index for structure (layout( column_major std430 offset=144) uniform highp 4-component vector of float)
|
||||
0:15 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:15 Constant:
|
||||
0:15 3 (const int)
|
||||
0:18 Function Definition: getWorld( ( global highp 4-component vector of float)
|
||||
0:18 Function Parameters:
|
||||
0:20 Sequence
|
||||
0:20 Branch: Return with expression
|
||||
0:20 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:20 uWorld: direct index for structure (layout( column_major std430 offset=0) uniform highp 4X4 matrix of float)
|
||||
0:20 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:20 Constant:
|
||||
0:20 0 (const int)
|
||||
0:20 'P' ( in highp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:? 'P' ( in highp 4-component vector of float)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
ERROR: Linking vertex stage: Only one push_constant block is allowed per stage
|
||||
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:16 Function Definition: main( ( global void)
|
||||
0:16 Function Parameters:
|
||||
0:18 Sequence
|
||||
0:18 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:18 'oColor' ( smooth out highp 4-component vector of float)
|
||||
0:18 component-wise multiply ( temp highp 4-component vector of float)
|
||||
0:18 color1: direct index for structure (layout( column_major std430 offset=128) uniform highp 4-component vector of float)
|
||||
0:18 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:18 Constant:
|
||||
0:18 2 (const int)
|
||||
0:18 Function Call: getColor2( ( global highp 4-component vector of float)
|
||||
0:20 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:20 gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
|
||||
0:20 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, out 1-element array of float CullDistance gl_CullDistance})
|
||||
0:20 Constant:
|
||||
0:20 0 (const uint)
|
||||
0:20 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:20 uProj: direct index for structure (layout( column_major std430 offset=64) uniform highp 4X4 matrix of float)
|
||||
0:20 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:20 Constant:
|
||||
0:20 1 (const int)
|
||||
0:20 Function Call: getWorld( ( global highp 4-component vector of float)
|
||||
0:13 Function Definition: getColor2( ( global highp 4-component vector of float)
|
||||
0:13 Function Parameters:
|
||||
0:15 Sequence
|
||||
0:15 Branch: Return with expression
|
||||
0:15 color2: direct index for structure (layout( column_major std430 offset=144) uniform highp 4-component vector of float)
|
||||
0:15 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:15 Constant:
|
||||
0:15 3 (const int)
|
||||
0:18 Function Definition: getWorld( ( global highp 4-component vector of float)
|
||||
0:18 Function Parameters:
|
||||
0:20 Sequence
|
||||
0:20 Branch: Return with expression
|
||||
0:20 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:20 uWorld: direct index for structure (layout( column_major std430 offset=0) uniform highp 4X4 matrix of float)
|
||||
0:20 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:20 Constant:
|
||||
0:20 0 (const int)
|
||||
0:20 'P' ( in highp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:? 'oColor' ( smooth out highp 4-component vector of float)
|
||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, out 1-element array of float CullDistance gl_CullDistance})
|
||||
0:? 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:? 'P' ( in highp 4-component vector of float)
|
||||
|
||||
Validation failed
|
||||
SPIR-V is not generated for failed compile or link
|
206
Test/baseResults/link.vk.pcNamingValid.0.0.vert.out
Executable file
206
Test/baseResults/link.vk.pcNamingValid.0.0.vert.out
Executable file
@ -0,0 +1,206 @@
|
||||
link.vk.pcNamingValid.0.0.vert
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:16 Function Definition: main( ( global void)
|
||||
0:16 Function Parameters:
|
||||
0:18 Sequence
|
||||
0:18 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:18 'oColor' (layout( location=0) smooth out highp 4-component vector of float)
|
||||
0:18 component-wise multiply ( temp highp 4-component vector of float)
|
||||
0:18 color1: direct index for structure (layout( column_major std430 offset=128) uniform highp 4-component vector of float)
|
||||
0:18 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:18 Constant:
|
||||
0:18 2 (const int)
|
||||
0:18 Function Call: getColor2( ( global highp 4-component vector of float)
|
||||
0:20 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:20 gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
|
||||
0:20 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, out unsized 1-element array of float CullDistance gl_CullDistance})
|
||||
0:20 Constant:
|
||||
0:20 0 (const uint)
|
||||
0:20 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:20 uProj: direct index for structure (layout( column_major std430 offset=64) uniform highp 4X4 matrix of float)
|
||||
0:20 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:20 Constant:
|
||||
0:20 1 (const int)
|
||||
0:20 Function Call: getWorld( ( global highp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:? 'oColor' (layout( location=0) smooth out highp 4-component vector of float)
|
||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, out unsized 1-element array of float CullDistance gl_CullDistance})
|
||||
|
||||
link.vk.pcNamingValid.0.1.vert
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:13 Function Definition: getColor2( ( global highp 4-component vector of float)
|
||||
0:13 Function Parameters:
|
||||
0:15 Sequence
|
||||
0:15 Branch: Return with expression
|
||||
0:15 color2: direct index for structure (layout( column_major std430 offset=144) uniform highp 4-component vector of float)
|
||||
0:15 'b' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:15 Constant:
|
||||
0:15 3 (const int)
|
||||
0:18 Function Definition: getWorld( ( global highp 4-component vector of float)
|
||||
0:18 Function Parameters:
|
||||
0:20 Sequence
|
||||
0:20 Branch: Return with expression
|
||||
0:20 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:20 uWorld: direct index for structure (layout( column_major std430 offset=0) uniform highp 4X4 matrix of float)
|
||||
0:20 'b' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:20 Constant:
|
||||
0:20 0 (const int)
|
||||
0:20 'P' (layout( location=0) in highp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'b' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:? 'P' (layout( location=0) in highp 4-component vector of float)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
WARNING: Linking vertex stage: Matched shader interfaces are using different instance names.
|
||||
a: "layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2}" versus b: "layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2}"
|
||||
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:16 Function Definition: main( ( global void)
|
||||
0:16 Function Parameters:
|
||||
0:18 Sequence
|
||||
0:18 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:18 'oColor' (layout( location=0) smooth out highp 4-component vector of float)
|
||||
0:18 component-wise multiply ( temp highp 4-component vector of float)
|
||||
0:18 color1: direct index for structure (layout( column_major std430 offset=128) uniform highp 4-component vector of float)
|
||||
0:18 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:18 Constant:
|
||||
0:18 2 (const int)
|
||||
0:18 Function Call: getColor2( ( global highp 4-component vector of float)
|
||||
0:20 move second child to first child ( temp highp 4-component vector of float)
|
||||
0:20 gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
|
||||
0:20 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, out 1-element array of float CullDistance gl_CullDistance})
|
||||
0:20 Constant:
|
||||
0:20 0 (const uint)
|
||||
0:20 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:20 uProj: direct index for structure (layout( column_major std430 offset=64) uniform highp 4X4 matrix of float)
|
||||
0:20 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:20 Constant:
|
||||
0:20 1 (const int)
|
||||
0:20 Function Call: getWorld( ( global highp 4-component vector of float)
|
||||
0:13 Function Definition: getColor2( ( global highp 4-component vector of float)
|
||||
0:13 Function Parameters:
|
||||
0:15 Sequence
|
||||
0:15 Branch: Return with expression
|
||||
0:15 color2: direct index for structure (layout( column_major std430 offset=144) uniform highp 4-component vector of float)
|
||||
0:15 'b' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:15 Constant:
|
||||
0:15 3 (const int)
|
||||
0:18 Function Definition: getWorld( ( global highp 4-component vector of float)
|
||||
0:18 Function Parameters:
|
||||
0:20 Sequence
|
||||
0:20 Branch: Return with expression
|
||||
0:20 matrix-times-vector ( temp highp 4-component vector of float)
|
||||
0:20 uWorld: direct index for structure (layout( column_major std430 offset=0) uniform highp 4X4 matrix of float)
|
||||
0:20 'b' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:20 Constant:
|
||||
0:20 0 (const int)
|
||||
0:20 'P' (layout( location=0) in highp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'a' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4X4 matrix of float uWorld, layout( column_major std430 offset=64) uniform highp 4X4 matrix of float uProj, layout( column_major std430 offset=128) uniform highp 4-component vector of float color1, layout( column_major std430 offset=144) uniform highp 4-component vector of float color2})
|
||||
0:? 'oColor' (layout( location=0) smooth out highp 4-component vector of float)
|
||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, out 1-element array of float CullDistance gl_CullDistance})
|
||||
0:? 'P' (layout( location=0) in highp 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 53
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 14 31 48
|
||||
Source GLSL 450
|
||||
Name 4 "main"
|
||||
Name 9 "getColor2("
|
||||
Name 11 "getWorld("
|
||||
Name 14 "oColor"
|
||||
Name 16 "PCBlock"
|
||||
MemberName 16(PCBlock) 0 "uWorld"
|
||||
MemberName 16(PCBlock) 1 "uProj"
|
||||
MemberName 16(PCBlock) 2 "color1"
|
||||
MemberName 16(PCBlock) 3 "color2"
|
||||
Name 18 "a"
|
||||
Name 29 "gl_PerVertex"
|
||||
MemberName 29(gl_PerVertex) 0 "gl_Position"
|
||||
MemberName 29(gl_PerVertex) 1 "gl_PointSize"
|
||||
MemberName 29(gl_PerVertex) 2 "gl_ClipDistance"
|
||||
MemberName 29(gl_PerVertex) 3 "gl_CullDistance"
|
||||
Name 31 ""
|
||||
Name 48 "P"
|
||||
Decorate 14(oColor) Location 0
|
||||
MemberDecorate 16(PCBlock) 0 ColMajor
|
||||
MemberDecorate 16(PCBlock) 0 Offset 0
|
||||
MemberDecorate 16(PCBlock) 0 MatrixStride 16
|
||||
MemberDecorate 16(PCBlock) 1 ColMajor
|
||||
MemberDecorate 16(PCBlock) 1 Offset 64
|
||||
MemberDecorate 16(PCBlock) 1 MatrixStride 16
|
||||
MemberDecorate 16(PCBlock) 2 Offset 128
|
||||
MemberDecorate 16(PCBlock) 3 Offset 144
|
||||
Decorate 16(PCBlock) Block
|
||||
MemberDecorate 29(gl_PerVertex) 0 BuiltIn Position
|
||||
MemberDecorate 29(gl_PerVertex) 1 BuiltIn PointSize
|
||||
MemberDecorate 29(gl_PerVertex) 2 BuiltIn ClipDistance
|
||||
MemberDecorate 29(gl_PerVertex) 3 BuiltIn CullDistance
|
||||
Decorate 29(gl_PerVertex) Block
|
||||
Decorate 48(P) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypeFunction 7(fvec4)
|
||||
13: TypePointer Output 7(fvec4)
|
||||
14(oColor): 13(ptr) Variable Output
|
||||
15: TypeMatrix 7(fvec4) 4
|
||||
16(PCBlock): TypeStruct 15 15 7(fvec4) 7(fvec4)
|
||||
17: TypePointer PushConstant 16(PCBlock)
|
||||
18(a): 17(ptr) Variable PushConstant
|
||||
19: TypeInt 32 1
|
||||
20: 19(int) Constant 2
|
||||
21: TypePointer PushConstant 7(fvec4)
|
||||
26: TypeInt 32 0
|
||||
27: 26(int) Constant 1
|
||||
28: TypeArray 6(float) 27
|
||||
29(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 28 28
|
||||
30: TypePointer Output 29(gl_PerVertex)
|
||||
31: 30(ptr) Variable Output
|
||||
32: 19(int) Constant 0
|
||||
33: 19(int) Constant 1
|
||||
34: TypePointer PushConstant 15
|
||||
40: 19(int) Constant 3
|
||||
47: TypePointer Input 7(fvec4)
|
||||
48(P): 47(ptr) Variable Input
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
22: 21(ptr) AccessChain 18(a) 20
|
||||
23: 7(fvec4) Load 22
|
||||
24: 7(fvec4) FunctionCall 9(getColor2()
|
||||
25: 7(fvec4) FMul 23 24
|
||||
Store 14(oColor) 25
|
||||
35: 34(ptr) AccessChain 18(a) 33
|
||||
36: 15 Load 35
|
||||
37: 7(fvec4) FunctionCall 11(getWorld()
|
||||
38: 7(fvec4) MatrixTimesVector 36 37
|
||||
39: 13(ptr) AccessChain 31 32
|
||||
Store 39 38
|
||||
Return
|
||||
FunctionEnd
|
||||
9(getColor2(): 7(fvec4) Function None 8
|
||||
10: Label
|
||||
41: 21(ptr) AccessChain 18(a) 40
|
||||
42: 7(fvec4) Load 41
|
||||
ReturnValue 42
|
||||
FunctionEnd
|
||||
11(getWorld(): 7(fvec4) Function None 8
|
||||
12: Label
|
||||
45: 34(ptr) AccessChain 18(a) 32
|
||||
46: 15 Load 45
|
||||
49: 7(fvec4) Load 48(P)
|
||||
50: 7(fvec4) MatrixTimesVector 46 49
|
||||
ReturnValue 50
|
||||
FunctionEnd
|
52
Test/link.multiAnonBlocksInvalid.0.0.vert
Executable file
52
Test/link.multiAnonBlocksInvalid.0.0.vert
Executable file
@ -0,0 +1,52 @@
|
||||
#version 430
|
||||
|
||||
// Error: Block has different members
|
||||
layout (std140) uniform Block
|
||||
{
|
||||
mat4 uProj;
|
||||
};
|
||||
|
||||
// Error: BufferBlock has different members
|
||||
buffer BufferBlock
|
||||
{
|
||||
vec4 b;
|
||||
};
|
||||
|
||||
// Error: Vertex has different members
|
||||
out Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
};
|
||||
|
||||
// Error: ColorBlock has different members
|
||||
layout (std140) uniform ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
vec4 color2;
|
||||
// Error, redeclare varaible in another anonymous block
|
||||
vec4 v1;
|
||||
};
|
||||
|
||||
// Error: NamedBlock is anonymous in other compilation unit
|
||||
layout (std140) uniform NamedBlock
|
||||
{
|
||||
mat4 m;
|
||||
} myName;
|
||||
|
||||
vec4 getWorld();
|
||||
vec4 getColor2();
|
||||
|
||||
out vec4 oColor;
|
||||
|
||||
// Error: redeclare varaibles that are in anonymous blocks
|
||||
out vec4 v1;
|
||||
uniform mat4 uProj;
|
||||
|
||||
void
|
||||
main()
|
||||
{
|
||||
oColor = color1 * getColor2();
|
||||
v1 = color1;
|
||||
|
||||
gl_Position = uProj * getWorld();
|
||||
}
|
48
Test/link.multiAnonBlocksInvalid.0.1.vert
Executable file
48
Test/link.multiAnonBlocksInvalid.0.1.vert
Executable file
@ -0,0 +1,48 @@
|
||||
#version 430
|
||||
|
||||
// Error: ColorBlock has different members
|
||||
layout (std140) uniform ColorBlock
|
||||
{
|
||||
vec4 color2;
|
||||
};
|
||||
|
||||
// Error: Block has different members
|
||||
layout (std140) uniform Block
|
||||
{
|
||||
mat4 uProj;
|
||||
mat4 uWorld;
|
||||
};
|
||||
|
||||
// Error: Vertex has different members
|
||||
out Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
vec4 v2;
|
||||
};
|
||||
|
||||
// Error BufferBlock has different members
|
||||
buffer BufferBlock
|
||||
{
|
||||
vec4 a;
|
||||
};
|
||||
|
||||
// Error: NamedBlock is anonymous in other compilation unit
|
||||
layout (std140) uniform NamedBlock
|
||||
{
|
||||
mat4 m;
|
||||
};
|
||||
|
||||
|
||||
in vec4 P;
|
||||
|
||||
vec4 getColor2()
|
||||
{
|
||||
return color2;
|
||||
}
|
||||
|
||||
vec4 getWorld()
|
||||
{
|
||||
return uWorld * P;
|
||||
v2 = vec4(1);
|
||||
}
|
||||
|
38
Test/link.multiAnonBlocksValid.0.0.vert
Executable file
38
Test/link.multiAnonBlocksValid.0.0.vert
Executable file
@ -0,0 +1,38 @@
|
||||
#version 430
|
||||
|
||||
// Verify that matching by block name is working, not
|
||||
// instance name, which was at one point failing on this
|
||||
// test due to E.g anon@1 being different blocks for
|
||||
// different compilation units
|
||||
|
||||
layout (std140) uniform Block
|
||||
{
|
||||
mat4 uProj;
|
||||
mat4 uWorld;
|
||||
};
|
||||
|
||||
out Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
vec4 v2;
|
||||
};
|
||||
|
||||
layout (std140) uniform ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
vec4 color2;
|
||||
};
|
||||
|
||||
vec4 getWorld();
|
||||
vec4 getColor2();
|
||||
|
||||
out vec4 oColor;
|
||||
|
||||
void
|
||||
main()
|
||||
{
|
||||
oColor = color1 * getColor2();
|
||||
v1 = color1;
|
||||
|
||||
gl_Position = uProj * getWorld();
|
||||
}
|
34
Test/link.multiAnonBlocksValid.0.1.vert
Executable file
34
Test/link.multiAnonBlocksValid.0.1.vert
Executable file
@ -0,0 +1,34 @@
|
||||
#version 430
|
||||
|
||||
layout (std140) uniform ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
vec4 color2;
|
||||
};
|
||||
|
||||
layout (std140) uniform Block
|
||||
{
|
||||
mat4 uProj;
|
||||
mat4 uWorld;
|
||||
};
|
||||
|
||||
out Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
vec4 v2;
|
||||
};
|
||||
|
||||
|
||||
in vec4 P;
|
||||
|
||||
vec4 getColor2()
|
||||
{
|
||||
return color2;
|
||||
}
|
||||
|
||||
vec4 getWorld()
|
||||
{
|
||||
return uWorld * P;
|
||||
v2 = vec4(1);
|
||||
}
|
||||
|
40
Test/link.multiBlocksInvalid.0.0.vert
Executable file
40
Test/link.multiBlocksInvalid.0.0.vert
Executable file
@ -0,0 +1,40 @@
|
||||
#version 430
|
||||
|
||||
// Verify that blocks with different instance names
|
||||
// are correctly detected as invalid non-matching blocks
|
||||
// when they are matched up by block name
|
||||
layout (std140) uniform Block
|
||||
{
|
||||
mat4 uProj;
|
||||
} uD;
|
||||
|
||||
out Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
} oV;
|
||||
|
||||
layout (std140) uniform ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
} uC;
|
||||
|
||||
// Error, buffer blocks and uniform blocks share the
|
||||
// same namespace for their block name
|
||||
layout (std430) buffer ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
} uBufC;
|
||||
|
||||
vec4 getWorld();
|
||||
vec4 getColor2();
|
||||
|
||||
out vec4 oColor;
|
||||
|
||||
void
|
||||
main()
|
||||
{
|
||||
oColor = uC.color1 * getColor2();
|
||||
oV.v1 = uC.color1 + uBufC.color1;
|
||||
|
||||
gl_Position = uD.uProj * getWorld();
|
||||
}
|
31
Test/link.multiBlocksInvalid.0.1.vert
Executable file
31
Test/link.multiBlocksInvalid.0.1.vert
Executable file
@ -0,0 +1,31 @@
|
||||
#version 430
|
||||
|
||||
layout (std140) uniform ColorBlock
|
||||
{
|
||||
vec4 color2;
|
||||
} uColorB;
|
||||
|
||||
layout (std140) uniform Block
|
||||
{
|
||||
mat4 uWorld;
|
||||
} uDefaultB;
|
||||
|
||||
out Vertex
|
||||
{
|
||||
vec4 v2;
|
||||
} oVert;
|
||||
|
||||
|
||||
in vec4 P;
|
||||
|
||||
vec4 getColor2()
|
||||
{
|
||||
return uColorB.color2;
|
||||
}
|
||||
|
||||
vec4 getWorld()
|
||||
{
|
||||
return uDefaultB.uWorld * P;
|
||||
oVert.v2 = vec4(1);
|
||||
}
|
||||
|
32
Test/link.multiBlocksValid.1.0.vert
Executable file
32
Test/link.multiBlocksValid.1.0.vert
Executable file
@ -0,0 +1,32 @@
|
||||
#version 430
|
||||
layout (std140) uniform Block
|
||||
{
|
||||
mat4 uProj;
|
||||
mat4 uWorld;
|
||||
} a;
|
||||
|
||||
out Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
vec4 v2;
|
||||
} b;
|
||||
|
||||
layout (std140) uniform ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
vec4 color2;
|
||||
} c;
|
||||
|
||||
vec4 getWorld();
|
||||
vec4 getColor2();
|
||||
|
||||
out vec4 oColor;
|
||||
|
||||
void
|
||||
main()
|
||||
{
|
||||
oColor = c.color1 * getColor2();
|
||||
b.v1 = c.color1;
|
||||
|
||||
gl_Position = a.uProj * getWorld();
|
||||
}
|
34
Test/link.multiBlocksValid.1.1.vert
Executable file
34
Test/link.multiBlocksValid.1.1.vert
Executable file
@ -0,0 +1,34 @@
|
||||
#version 430
|
||||
|
||||
layout (std140) uniform ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
vec4 color2;
|
||||
} a;
|
||||
|
||||
layout (std140) uniform Block
|
||||
{
|
||||
mat4 uProj;
|
||||
mat4 uWorld;
|
||||
} b;
|
||||
|
||||
out Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
vec4 v2;
|
||||
} c;
|
||||
|
||||
|
||||
in vec4 P;
|
||||
|
||||
vec4 getColor2()
|
||||
{
|
||||
return a.color2;
|
||||
}
|
||||
|
||||
vec4 getWorld()
|
||||
{
|
||||
return b.uWorld * P;
|
||||
c.v2 = vec4(1);
|
||||
}
|
||||
|
49
Test/link.vk.multiBlocksValid.0.0.vert
Executable file
49
Test/link.vk.multiBlocksValid.0.0.vert
Executable file
@ -0,0 +1,49 @@
|
||||
#version 430
|
||||
|
||||
// OK: different instance names is allowed in other unit
|
||||
layout (std140, binding = 0) uniform MatrixBlock
|
||||
{
|
||||
mat4 uProj;
|
||||
mat4 uWorld;
|
||||
} uM;
|
||||
|
||||
// OK: other unit has it as anonymous, but that is allowed
|
||||
out Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
vec4 v2;
|
||||
} oV;
|
||||
|
||||
// OK: different instance names is allowed in other unit
|
||||
layout (std140, binding = 1) uniform ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
bool b;
|
||||
vec4 color2;
|
||||
vec4 color3;
|
||||
} uC;
|
||||
|
||||
// OK: different instance names is allowed in other unit
|
||||
layout (std430, binding = 1) buffer BufferBlock
|
||||
{
|
||||
mat4 p;
|
||||
} uBuf;
|
||||
|
||||
layout (std430, binding = 0) buffer SecondaryColorBlock
|
||||
{
|
||||
vec4 c;
|
||||
} uColorBuf;
|
||||
|
||||
vec4 getWorld();
|
||||
vec4 getColor2();
|
||||
|
||||
out vec4 oColor;
|
||||
|
||||
void
|
||||
main()
|
||||
{
|
||||
oColor = uC.color1 * getColor2() * uColorBuf.c;
|
||||
oV.v1 = uC.color1;
|
||||
|
||||
gl_Position = uM.uProj * getWorld();
|
||||
}
|
46
Test/link.vk.multiBlocksValid.0.1.vert
Executable file
46
Test/link.vk.multiBlocksValid.0.1.vert
Executable file
@ -0,0 +1,46 @@
|
||||
#version 430
|
||||
|
||||
// OK: different instance names is allowed in other unit
|
||||
layout (std140, binding = 1) uniform ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
bool b;
|
||||
vec4 color2;
|
||||
vec4 color3;
|
||||
} uColor;
|
||||
|
||||
// OK: different instance names is allowed in other unit
|
||||
layout (std430, binding = 1) buffer BufferBlock
|
||||
{
|
||||
mat4 p;
|
||||
} uBuffer;
|
||||
|
||||
// OK: different instance names is allowed in other unit
|
||||
layout (std140, binding = 0) uniform MatrixBlock
|
||||
{
|
||||
mat4 uProj;
|
||||
mat4 uWorld;
|
||||
} uMatrix;
|
||||
|
||||
// OK, it's allowed for input/output interfaces to
|
||||
// be anonymous is one unit and not in another
|
||||
out Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
vec4 v2;
|
||||
};
|
||||
|
||||
|
||||
in vec4 P;
|
||||
|
||||
vec4 getColor2()
|
||||
{
|
||||
return uColor.color2;
|
||||
}
|
||||
|
||||
vec4 getWorld()
|
||||
{
|
||||
v1 = vec4(1);
|
||||
return uMatrix.uWorld * P;
|
||||
}
|
||||
|
62
Test/link.vk.multiBlocksValid.1.0.geom
Executable file
62
Test/link.vk.multiBlocksValid.1.0.geom
Executable file
@ -0,0 +1,62 @@
|
||||
#version 430
|
||||
|
||||
layout (triangles) in;
|
||||
layout (triangle_strip, max_vertices = 3) out;
|
||||
|
||||
// OK: different instance names is allowed
|
||||
layout (std140, binding = 0) uniform MatrixBlock
|
||||
{
|
||||
mat4 uProj;
|
||||
mat4 uWorld;
|
||||
} uM;
|
||||
|
||||
// Verify that in/out blocks with same block name work
|
||||
in Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
vec4 v2;
|
||||
} iV[3];
|
||||
|
||||
out Vertex
|
||||
{
|
||||
vec4 val1;
|
||||
} oV;
|
||||
|
||||
// OK: different instance names is allowed
|
||||
layout (std140, binding = 1) uniform ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
bool b;
|
||||
vec4 color2;
|
||||
vec4 color3;
|
||||
} uC;
|
||||
|
||||
// OK: different instance names is allowed
|
||||
layout (std430, binding = 1) buffer BufferBlock
|
||||
{
|
||||
mat4 p;
|
||||
} uBuf;
|
||||
|
||||
vec4 getWorld(int i);
|
||||
vec4 getColor2();
|
||||
|
||||
out vec4 oColor;
|
||||
|
||||
float globalF;
|
||||
|
||||
void
|
||||
main()
|
||||
{
|
||||
oColor = uC.color1 * getColor2();
|
||||
|
||||
globalF = 1.0;
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
gl_Position = uM.uProj * getWorld(i);
|
||||
oV.val1 = uC.color1 + iV[i].v2 * globalF;
|
||||
EmitVertex();
|
||||
}
|
||||
|
||||
EndPrimitive();
|
||||
}
|
54
Test/link.vk.multiBlocksValid.1.1.geom
Executable file
54
Test/link.vk.multiBlocksValid.1.1.geom
Executable file
@ -0,0 +1,54 @@
|
||||
#version 430
|
||||
|
||||
layout (triangles) in;
|
||||
layout (triangle_strip, max_vertices = 3) out;
|
||||
|
||||
// OK: different instance names is allowed
|
||||
layout (std140, binding = 1) uniform ColorBlock
|
||||
{
|
||||
vec4 color1;
|
||||
bool b;
|
||||
vec4 color2;
|
||||
vec4 color3;
|
||||
} uColor;
|
||||
|
||||
// OK: different instance names is allowed
|
||||
layout (std430, binding = 1) buffer BufferBlock
|
||||
{
|
||||
mat4 p;
|
||||
} uBuffer;
|
||||
|
||||
// OK: different instance names is allowed
|
||||
layout (std140, binding = 0) uniform MatrixBlock
|
||||
{
|
||||
mat4 uProj;
|
||||
mat4 uWorld;
|
||||
} uMatrix;
|
||||
|
||||
// OK, it's allowed for input/output interfaces to
|
||||
// be anonymous is one unit and not in another
|
||||
out Vertex
|
||||
{
|
||||
vec4 val1;
|
||||
};
|
||||
|
||||
in Vertex
|
||||
{
|
||||
vec4 v1;
|
||||
vec4 v2;
|
||||
} iVV[];
|
||||
|
||||
|
||||
in vec4 P[3];
|
||||
|
||||
vec4 getColor2()
|
||||
{
|
||||
return uColor.color2;
|
||||
}
|
||||
|
||||
vec4 getWorld(int i)
|
||||
{
|
||||
val1 = vec4(1);
|
||||
return uMatrix.uWorld * iVV[i].v1;
|
||||
}
|
||||
|
21
Test/link.vk.pcNamingInvalid.0.0.vert
Executable file
21
Test/link.vk.pcNamingInvalid.0.0.vert
Executable file
@ -0,0 +1,21 @@
|
||||
#version 450
|
||||
layout (push_constant) uniform Block
|
||||
{
|
||||
mat4 uWorld;
|
||||
mat4 uProj;
|
||||
vec4 color1;
|
||||
vec4 color2;
|
||||
} a;
|
||||
|
||||
vec4 getWorld();
|
||||
vec4 getColor2();
|
||||
|
||||
out vec4 oColor;
|
||||
|
||||
void
|
||||
main()
|
||||
{
|
||||
oColor = a.color1 * getColor2();
|
||||
|
||||
gl_Position = a.uProj * getWorld();
|
||||
}
|
22
Test/link.vk.pcNamingInvalid.0.1.vert
Executable file
22
Test/link.vk.pcNamingInvalid.0.1.vert
Executable file
@ -0,0 +1,22 @@
|
||||
#version 450
|
||||
|
||||
layout (push_constant) uniform Block2
|
||||
{
|
||||
mat4 uWorld;
|
||||
mat4 uProj;
|
||||
vec4 color1;
|
||||
vec4 color2;
|
||||
} a;
|
||||
|
||||
in vec4 P;
|
||||
|
||||
vec4 getColor2()
|
||||
{
|
||||
return a.color2;
|
||||
}
|
||||
|
||||
vec4 getWorld()
|
||||
{
|
||||
return a.uWorld * P;
|
||||
}
|
||||
|
21
Test/link.vk.pcNamingValid.0.0.vert
Executable file
21
Test/link.vk.pcNamingValid.0.0.vert
Executable file
@ -0,0 +1,21 @@
|
||||
#version 450
|
||||
layout (push_constant) uniform PCBlock
|
||||
{
|
||||
mat4 uWorld;
|
||||
mat4 uProj;
|
||||
vec4 color1;
|
||||
vec4 color2;
|
||||
} a;
|
||||
|
||||
vec4 getWorld();
|
||||
vec4 getColor2();
|
||||
|
||||
layout(location = 0) out vec4 oColor;
|
||||
|
||||
void
|
||||
main()
|
||||
{
|
||||
oColor = a.color1 * getColor2();
|
||||
|
||||
gl_Position = a.uProj * getWorld();
|
||||
}
|
22
Test/link.vk.pcNamingValid.0.1.vert
Executable file
22
Test/link.vk.pcNamingValid.0.1.vert
Executable file
@ -0,0 +1,22 @@
|
||||
#version 450
|
||||
|
||||
layout (push_constant) uniform PCBlock
|
||||
{
|
||||
mat4 uWorld;
|
||||
mat4 uProj;
|
||||
vec4 color1;
|
||||
vec4 color2;
|
||||
} b;
|
||||
|
||||
layout(location = 0) in vec4 P;
|
||||
|
||||
vec4 getColor2()
|
||||
{
|
||||
return b.color2;
|
||||
}
|
||||
|
||||
vec4 getWorld()
|
||||
{
|
||||
return b.uWorld * P;
|
||||
}
|
||||
|
@ -473,6 +473,18 @@ enum TInterlockOrdering {
|
||||
EioCount,
|
||||
};
|
||||
|
||||
enum TShaderInterface
|
||||
{
|
||||
// Includes both uniform blocks and buffer blocks
|
||||
EsiUniform = 0,
|
||||
EsiInput,
|
||||
EsiOutput,
|
||||
EsiNone,
|
||||
|
||||
EsiCount
|
||||
};
|
||||
|
||||
|
||||
class TQualifier {
|
||||
public:
|
||||
static const int layoutNotSet = -1;
|
||||
@ -1616,6 +1628,23 @@ public:
|
||||
assert(fieldName);
|
||||
return *fieldName;
|
||||
}
|
||||
TShaderInterface getShaderInterface() const
|
||||
{
|
||||
if (basicType != EbtBlock)
|
||||
return EsiNone;
|
||||
|
||||
switch (qualifier.storage) {
|
||||
default:
|
||||
return EsiNone;
|
||||
case EvqVaryingIn:
|
||||
return EsiInput;
|
||||
case EvqVaryingOut:
|
||||
return EsiOutput;
|
||||
case EvqUniform:
|
||||
case EvqBuffer:
|
||||
return EsiUniform;
|
||||
}
|
||||
}
|
||||
|
||||
virtual TBasicType getBasicType() const { return basicType; }
|
||||
virtual const TSampler& getSampler() const { return sampler; }
|
||||
|
96
glslang/MachineIndependent/linkValidate.cpp
Normal file → Executable file
96
glslang/MachineIndependent/linkValidate.cpp
Normal file → Executable file
@ -303,10 +303,10 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
|
||||
|
||||
// Map by global name to unique ID to rationalize the same object having
|
||||
// differing IDs in different trees.
|
||||
TMap<TString, int> idMap;
|
||||
TIdMaps idMaps;
|
||||
int maxId;
|
||||
seedIdMap(idMap, maxId);
|
||||
remapIds(idMap, maxId + 1, unit);
|
||||
seedIdMap(idMaps, maxId);
|
||||
remapIds(idMaps, maxId + 1, unit);
|
||||
|
||||
mergeBodies(infoSink, globals, unitGlobals);
|
||||
mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects);
|
||||
@ -315,27 +315,40 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
|
||||
|
||||
#endif
|
||||
|
||||
static const TString& getNameForIdMap(TIntermSymbol* symbol)
|
||||
{
|
||||
TShaderInterface si = symbol->getType().getShaderInterface();
|
||||
if (si == EsiNone)
|
||||
return symbol->getName();
|
||||
else
|
||||
return symbol->getType().getTypeName();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Traverser that seeds an ID map with all built-ins, and tracks the
|
||||
// maximum ID used.
|
||||
// (It would be nice to put this in a function, but that causes warnings
|
||||
// on having no bodies for the copy-constructor/operator=.)
|
||||
class TBuiltInIdTraverser : public TIntermTraverser {
|
||||
public:
|
||||
TBuiltInIdTraverser(TMap<TString, int>& idMap) : idMap(idMap), maxId(0) { }
|
||||
TBuiltInIdTraverser(TIdMaps& idMaps) : idMaps(idMaps), maxId(0) { }
|
||||
// If it's a built in, add it to the map.
|
||||
// Track the max ID.
|
||||
virtual void visitSymbol(TIntermSymbol* symbol)
|
||||
{
|
||||
const TQualifier& qualifier = symbol->getType().getQualifier();
|
||||
if (qualifier.builtIn != EbvNone)
|
||||
idMap[symbol->getName()] = symbol->getId();
|
||||
if (qualifier.builtIn != EbvNone) {
|
||||
TShaderInterface si = symbol->getType().getShaderInterface();
|
||||
idMaps[si][getNameForIdMap(symbol)] = symbol->getId();
|
||||
}
|
||||
maxId = std::max(maxId, symbol->getId());
|
||||
}
|
||||
int getMaxId() const { return maxId; }
|
||||
protected:
|
||||
TBuiltInIdTraverser(TBuiltInIdTraverser&);
|
||||
TBuiltInIdTraverser& operator=(TBuiltInIdTraverser&);
|
||||
TMap<TString, int>& idMap;
|
||||
TIdMaps& idMaps;
|
||||
int maxId;
|
||||
};
|
||||
|
||||
@ -344,31 +357,33 @@ protected:
|
||||
// on having no bodies for the copy-constructor/operator=.)
|
||||
class TUserIdTraverser : public TIntermTraverser {
|
||||
public:
|
||||
TUserIdTraverser(TMap<TString, int>& idMap) : idMap(idMap) { }
|
||||
TUserIdTraverser(TIdMaps& idMaps) : idMaps(idMaps) { }
|
||||
// If its a non-built-in global, add it to the map.
|
||||
virtual void visitSymbol(TIntermSymbol* symbol)
|
||||
{
|
||||
const TQualifier& qualifier = symbol->getType().getQualifier();
|
||||
if (qualifier.builtIn == EbvNone)
|
||||
idMap[symbol->getName()] = symbol->getId();
|
||||
if (qualifier.builtIn == EbvNone) {
|
||||
TShaderInterface si = symbol->getType().getShaderInterface();
|
||||
idMaps[si][getNameForIdMap(symbol)] = symbol->getId();
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
TUserIdTraverser(TUserIdTraverser&);
|
||||
TUserIdTraverser& operator=(TUserIdTraverser&);
|
||||
TMap<TString, int>& idMap; // over biggest id
|
||||
TIdMaps& idMaps; // over biggest id
|
||||
};
|
||||
|
||||
// Initialize the the ID map with what we know of 'this' AST.
|
||||
void TIntermediate::seedIdMap(TMap<TString, int>& idMap, int& maxId)
|
||||
void TIntermediate::seedIdMap(TIdMaps& idMaps, int& maxId)
|
||||
{
|
||||
// all built-ins everywhere need to align on IDs and contribute to the max ID
|
||||
TBuiltInIdTraverser builtInIdTraverser(idMap);
|
||||
TBuiltInIdTraverser builtInIdTraverser(idMaps);
|
||||
treeRoot->traverse(&builtInIdTraverser);
|
||||
maxId = builtInIdTraverser.getMaxId();
|
||||
|
||||
// user variables in the linker object list need to align on ids
|
||||
TUserIdTraverser userIdTraverser(idMap);
|
||||
TUserIdTraverser userIdTraverser(idMaps);
|
||||
findLinkerObjects()->traverse(&userIdTraverser);
|
||||
}
|
||||
|
||||
@ -377,7 +392,7 @@ void TIntermediate::seedIdMap(TMap<TString, int>& idMap, int& maxId)
|
||||
// on having no bodies for the copy-constructor/operator=.)
|
||||
class TRemapIdTraverser : public TIntermTraverser {
|
||||
public:
|
||||
TRemapIdTraverser(const TMap<TString, int>& idMap, int idShift) : idMap(idMap), idShift(idShift) { }
|
||||
TRemapIdTraverser(const TIdMaps& idMaps, int idShift) : idMaps(idMaps), idShift(idShift) { }
|
||||
// Do the mapping:
|
||||
// - if the same symbol, adopt the 'this' ID
|
||||
// - otherwise, ensure a unique ID by shifting to a new space
|
||||
@ -386,8 +401,9 @@ public:
|
||||
const TQualifier& qualifier = symbol->getType().getQualifier();
|
||||
bool remapped = false;
|
||||
if (qualifier.isLinkable() || qualifier.builtIn != EbvNone) {
|
||||
auto it = idMap.find(symbol->getName());
|
||||
if (it != idMap.end()) {
|
||||
TShaderInterface si = symbol->getType().getShaderInterface();
|
||||
auto it = idMaps[si].find(getNameForIdMap(symbol));
|
||||
if (it != idMaps[si].end()) {
|
||||
symbol->changeId(it->second);
|
||||
remapped = true;
|
||||
}
|
||||
@ -398,14 +414,14 @@ public:
|
||||
protected:
|
||||
TRemapIdTraverser(TRemapIdTraverser&);
|
||||
TRemapIdTraverser& operator=(TRemapIdTraverser&);
|
||||
const TMap<TString, int>& idMap;
|
||||
const TIdMaps& idMaps;
|
||||
int idShift;
|
||||
};
|
||||
|
||||
void TIntermediate::remapIds(const TMap<TString, int>& idMap, int idShift, TIntermediate& unit)
|
||||
void TIntermediate::remapIds(const TIdMaps& idMaps, int idShift, TIntermediate& unit)
|
||||
{
|
||||
// Remap all IDs to either share or be unique, as dictated by the idMap and idShift.
|
||||
TRemapIdTraverser idTraverser(idMap, idShift);
|
||||
TRemapIdTraverser idTraverser(idMaps, idShift);
|
||||
unit.getTreeRoot()->traverse(&idTraverser);
|
||||
}
|
||||
|
||||
@ -447,7 +463,19 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
|
||||
TIntermSymbol* symbol = linkerObjects[linkObj]->getAsSymbolNode();
|
||||
TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode();
|
||||
assert(symbol && unitSymbol);
|
||||
if (symbol->getName() == unitSymbol->getName()) {
|
||||
|
||||
bool isSameSymbol = false;
|
||||
// If they are both blocks in the same shader interface,
|
||||
// match by the block-name, not the identifier name.
|
||||
if (symbol->getType().getBasicType() == EbtBlock && unitSymbol->getType().getBasicType() == EbtBlock) {
|
||||
if (symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) {
|
||||
isSameSymbol = symbol->getType().getTypeName() == unitSymbol->getType().getTypeName();
|
||||
}
|
||||
}
|
||||
else if (symbol->getName() == unitSymbol->getName())
|
||||
isSameSymbol = true;
|
||||
|
||||
if (isSameSymbol) {
|
||||
// filter out copy
|
||||
merge = false;
|
||||
|
||||
@ -527,6 +555,22 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
||||
writeTypeComparison = true;
|
||||
}
|
||||
|
||||
// Uniform and buffer blocks must either both have an instance name, or
|
||||
// must both be anonymous. The names don't need to match though.
|
||||
if (symbol.getQualifier().isUniformOrBuffer() &&
|
||||
(IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()))) {
|
||||
error(infoSink, "Matched Uniform or Storage blocks must all be anonymous,"
|
||||
" or all be named:");
|
||||
writeTypeComparison = true;
|
||||
}
|
||||
|
||||
if (symbol.getQualifier().storage == unitSymbol.getQualifier().storage &&
|
||||
(IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()) ||
|
||||
(!IsAnonymous(symbol.getName()) && symbol.getName() != unitSymbol.getName()))) {
|
||||
warn(infoSink, "Matched shader interfaces are using different instance names.");
|
||||
writeTypeComparison = true;
|
||||
}
|
||||
|
||||
// Precision...
|
||||
if (symbol.getQualifier().precision != unitSymbol.getQualifier().precision) {
|
||||
error(infoSink, "Precision qualifiers must match:");
|
||||
@ -597,9 +641,13 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
||||
}
|
||||
}
|
||||
|
||||
if (writeTypeComparison)
|
||||
infoSink.info << " " << symbol.getName() << ": \"" << symbol.getType().getCompleteString() << "\" versus \"" <<
|
||||
unitSymbol.getType().getCompleteString() << "\"\n";
|
||||
if (writeTypeComparison) {
|
||||
infoSink.info << " " << symbol.getName() << ": \"" << symbol.getType().getCompleteString() << "\" versus ";
|
||||
if (symbol.getName() != unitSymbol.getName())
|
||||
infoSink.info << unitSymbol.getName() << ": ";
|
||||
|
||||
infoSink.info << "\"" << unitSymbol.getType().getCompleteString() << "\"\n";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -225,6 +225,15 @@ enum ComputeDerivativeMode {
|
||||
LayoutDerivativeGroupLinear, // derivative_group_linearNV
|
||||
};
|
||||
|
||||
class TIdMaps {
|
||||
public:
|
||||
TMap<TString, int>& operator[](int i) { return maps[i]; };
|
||||
const TMap<TString, int>& operator[](int i) const { return maps[i]; };
|
||||
private:
|
||||
TMap<TString, int> maps[EsiCount];
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Set of helper functions to help parse and build the tree.
|
||||
//
|
||||
@ -862,8 +871,8 @@ protected:
|
||||
void mergeCallGraphs(TInfoSink&, TIntermediate&);
|
||||
void mergeModes(TInfoSink&, TIntermediate&);
|
||||
void mergeTrees(TInfoSink&, TIntermediate&);
|
||||
void seedIdMap(TMap<TString, int>& idMap, int& maxId);
|
||||
void remapIds(const TMap<TString, int>& idMap, int idShift, TIntermediate&);
|
||||
void seedIdMap(TIdMaps& idMaps, int& maxId);
|
||||
void remapIds(const TIdMaps& idMaps, int idShift, TIntermediate&);
|
||||
void mergeBodies(TInfoSink&, TIntermSequence& globals, const TIntermSequence& unitGlobals);
|
||||
void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects);
|
||||
void mergeImplicitArraySizes(TType&, const TType&);
|
||||
|
4
gtests/Link.FromFile.Vk.cpp
Normal file → Executable file
4
gtests/Link.FromFile.Vk.cpp
Normal file → Executable file
@ -115,6 +115,10 @@ INSTANTIATE_TEST_CASE_P(
|
||||
"link.vk.differentPC.0.2.frag"},
|
||||
{"link.vk.differentPC.1.0.frag", "link.vk.differentPC.1.1.frag",
|
||||
"link.vk.differentPC.1.2.frag"},
|
||||
{"link.vk.pcNamingValid.0.0.vert", "link.vk.pcNamingValid.0.1.vert"},
|
||||
{"link.vk.pcNamingInvalid.0.0.vert", "link.vk.pcNamingInvalid.0.1.vert"},
|
||||
{"link.vk.multiBlocksValid.0.0.vert", "link.vk.multiBlocksValid.0.1.vert"},
|
||||
{"link.vk.multiBlocksValid.1.0.geom", "link.vk.multiBlocksValid.1.1.geom"},
|
||||
}))
|
||||
);
|
||||
// clang-format on
|
||||
|
6
gtests/Link.FromFile.cpp
Normal file → Executable file
6
gtests/Link.FromFile.cpp
Normal file → Executable file
@ -100,7 +100,11 @@ INSTANTIATE_TEST_CASE_P(
|
||||
{"150.tesc", "150.tese", "400.tesc", "400.tese", "410.tesc", "420.tesc", "420.tese"},
|
||||
{"max_vertices_0.geom"},
|
||||
{"es-link1.frag", "es-link2.frag"},
|
||||
{"missingBodies.vert"}
|
||||
{"missingBodies.vert"},
|
||||
{"link.multiAnonBlocksInvalid.0.0.vert", "link.multiAnonBlocksInvalid.0.1.vert"},
|
||||
{"link.multiAnonBlocksValid.0.0.vert", "link.multiAnonBlocksValid.0.1.vert"},
|
||||
{"link.multiBlocksInvalid.0.0.vert", "link.multiBlocksInvalid.0.1.vert"},
|
||||
{"link.multiBlocksValid.1.0.vert", "link.multiBlocksValid.1.1.vert"},
|
||||
}))
|
||||
);
|
||||
// clang-format on
|
||||
|
Loading…
Reference in New Issue
Block a user