Add link validation infrastructure for multiple compilation units per stage. Includes a new, straightforward, C++ interface to the front end.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22927 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-09-04 21:19:27 +00:00
parent 2f1eb37d82
commit 69f4b517c2
24 changed files with 655 additions and 161 deletions

View File

@@ -1,4 +1,4 @@
WARNING: 0:1: '#version' : statement missing: use #version on first line of shader
WARNING: #version: statement missing; use #version on first line of shader
0:? Sequence
0:4 Sequence
0:4 move second child to first child (highp float)

View File

@@ -1,4 +1,4 @@
WARNING: 0:1: '#version' : statement missing: use #version on first line of shader
WARNING: #version: statement missing; use #version on first line of shader
ERROR: 0:1: 'main' : function cannot take any parameter(s)
ERROR: 0:1: 'int' : main function cannot return a value
ERROR: 2 compilation errors. No code generated.

View File

@@ -0,0 +1,33 @@
mains1.frag
0:3Function Definition: main( (void)
0:3 Function Parameters:
mains2.frag
0:3Function Definition: main( (void)
0:3 Function Parameters:
noMain1.geom
ERROR: #version: geometry shaders require non-es profile and version 150 or above
ERROR: 1 compilation errors. No code generated.
0:3Function Definition: foo( (void)
0:3 Function Parameters:
noMain2.geom
0:3Function Definition: bar( (void)
0:3 Function Parameters:
Linked geometry stage:
ERROR: Missing entry point: Each stage requires one "void main()" entry point
Linked fragment stage:
ERROR: Too many entry points: Each stage can have at most one "void main()" entry point.

View File

@@ -0,0 +1,26 @@
noMain.vert
0:3Function Definition: foo( (void)
0:3 Function Parameters:
mains.frag
ERROR: 0:7: 'main' : function already has a body
ERROR: 1 compilation errors. No code generated.
ERROR: node is still EOpNull!
0:3 Function Definition: main( (void)
0:3 Function Parameters:
0:7 Function Definition: main( (void)
0:7 Function Parameters:
Linked vertex stage:
ERROR: Missing entry point: Each stage requires one "void main()" entry point
Linked fragment stage:
ERROR: Too many entry points: Each stage can have at most one "void main()" entry point.

View File

@@ -1,4 +1,4 @@
WARNING: 0:1: '#version' : statement missing: use #version on first line of shader
WARNING: #version: statement missing; use #version on first line of shader
0:? Sequence
0:5 Function Definition: main( (void)
0:5 Function Parameters:

View File

@@ -1,4 +1,4 @@
ERROR: 0:1: '#version' : statement must appear first in ESSL shader; before comments or newlines
ERROR: #version: statement must appear first in es-profile shader; before comments or newlines
ERROR: 1 compilation errors. No code generated.
ERROR: node is still EOpNull!

View File

@@ -1,5 +1,4 @@
ERROR: #version: versions before 150 do not allow a profile token
ERROR: 0:1: '#version' : incorrect
ERROR: 0:38: 'attribute' : not supported in this stage: fragment
ERROR: 0:40: 'sampler2DRect' : Reserved word.
ERROR: 0:40: 'rectangle texture' : not supported for this version or the enabled extensions