Merge pull request #637 from KhronosGroup/token-paste

PP: Implement token pasting for PP identifiers.
This commit is contained in:
John Kessenich
2016-12-19 14:31:57 -07:00
committed by GitHub
10 changed files with 304 additions and 34 deletions

View File

@@ -77,9 +77,8 @@ ERROR: 0:192: 'gl_ClipDistance' : left of '[' is not of type array, matrix, or
ERROR: 0:192: 'assign' : l-value required (can't modify a const)
ERROR: 0:195: 'gl_ModelViewMatrix' : identifiers starting with "gl_" are reserved
ERROR: 0:200: 'token pasting (##)' : not supported for this version or the enabled extensions
ERROR: 0:200: '##' : token pasting not implemented (internal error)
ERROR: 0:200: '' : syntax error
ERROR: 80 compilation errors. No code generated.
ERROR: 0:203: 'token pasting (##)' : not supported for this version or the enabled extensions
ERROR: 79 compilation errors. No code generated.
Shader version: 120
@@ -427,7 +426,8 @@ ERROR: node is still EOpNull!
0:? 'c2D' (in 2-component vector of float)
0:? 'c3D' (in 3-component vector of float)
0:? 'v4' (uniform 4-component vector of float)
0:? 'abc' (global int)
0:? 'abcdef' (global int)
0:? 'qrstuv' (global int)
Linked vertex stage:
@@ -499,5 +499,6 @@ ERROR: node is still EOpNull!
0:? 'c2D' (in 2-component vector of float)
0:? 'c3D' (in 3-component vector of float)
0:? 'v4' (uniform 4-component vector of float)
0:? 'abc' (global int)
0:? 'abcdef' (global int)
0:? 'qrstuv' (global int)

View File

@@ -3,9 +3,7 @@ ERROR: 0:59: 'gl_InstanceID' : undeclared identifier
ERROR: 0:59: '=' : cannot convert from 'temp float' to 'temp int'
ERROR: 0:61: 'texelFetch' : no matching overloaded function found
ERROR: 0:61: 'assign' : cannot convert from 'const float' to 'temp int'
ERROR: 0:75: '##' : token pasting not implemented (internal error)
ERROR: 0:75: '' : syntax error
ERROR: 6 compilation errors. No code generated.
ERROR: 4 compilation errors. No code generated.
Shader version: 130
@@ -149,7 +147,8 @@ ERROR: node is still EOpNull!
0:? 'v4' (uniform 4-component vector of float)
0:? 'gl_ClipDistance' (smooth out implicitly-sized array of float ClipDistance)
0:? 'gl_TexCoord' (smooth out implicitly-sized array of 4-component vector of float TexCoord)
0:? 'abc' (global int)
0:? 'abcdef' (global int)
0:? 'qrstuv' (global int)
0:? 'gl_VertexID' (gl_VertexId int VertexId)
@@ -281,6 +280,7 @@ ERROR: node is still EOpNull!
0:? 'v4' (uniform 4-component vector of float)
0:? 'gl_ClipDistance' (smooth out 2-element array of float ClipDistance)
0:? 'gl_TexCoord' (smooth out 1-element array of 4-component vector of float TexCoord)
0:? 'abc' (global int)
0:? 'abcdef' (global int)
0:? 'qrstuv' (global int)
0:? 'gl_VertexID' (gl_VertexId int VertexId)

View File

@@ -0,0 +1,60 @@
tokenPaste.vert
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:38: '##' : unexpected location
ERROR: 0:40: '##' : unexpected location; end of replacement list
ERROR: 0:49: '##' : combined tokens are too long
ERROR: 0:52: '##' : only supported for preprocessing identifiers
ERROR: 4 compilation errors. No code generated.
Shader version: 450
ERROR: node is still EOpNull!
0:52 Sequence
0:52 move second child to first child (temp int)
0:52 'a' (global int)
0:52 Constant:
0:52 11 (const int)
0:? Linker Objects
0:? 'SecondExpansion' (global int)
0:? 'PostPasteExpansion' (global int)
0:? 'foo27' (global float)
0:? 'foo155' (uniform float)
0:? 'foo719' (global float)
0:? 'barfoo' (uniform float)
0:? 'argless' (global float)
0:? 'dc1' (global float)
0:? 'dc2' (global float)
0:? 'foo875' (uniform float)
0:? 'ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123451234' (global float)
0:? 'a' (global int)
0:? 'gl_VertexID' (gl_VertexId int VertexId)
0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
Linked vertex stage:
ERROR: Linking vertex stage: Missing entry point: Each stage requires one entry point
Shader version: 450
ERROR: node is still EOpNull!
0:52 Sequence
0:52 move second child to first child (temp int)
0:52 'a' (global int)
0:52 Constant:
0:52 11 (const int)
0:? Linker Objects
0:? 'SecondExpansion' (global int)
0:? 'PostPasteExpansion' (global int)
0:? 'foo27' (global float)
0:? 'foo155' (uniform float)
0:? 'foo719' (global float)
0:? 'barfoo' (uniform float)
0:? 'argless' (global float)
0:? 'dc1' (global float)
0:? 'dc2' (global float)
0:? 'foo875' (uniform float)
0:? 'ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123451234' (global float)
0:? 'a' (global int)
0:? 'gl_VertexID' (gl_VertexId int VertexId)
0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)