Full thread safety working:

- don't use [] for map lookups, it can modify the map
 - copy up built-in symbols out of shared symbol table levels before modifying them
 - enforce shallow vs. deep TType copies
 - combine maxArraySize with the array dimensions vector, encapsulate
 - remove chaining of array types


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22953 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-09-08 21:04:46 +00:00
parent 38f3b890de
commit 5f753e0222
17 changed files with 259 additions and 267 deletions

View File

@@ -114,3 +114,12 @@ void v2()
{
return v1(); // ERROR, no expression allowed, even though void
}
void atest()
{
vec4 v = gl_TexCoord[1];
v += gl_TexCoord[3];
}
varying vec4 gl_TexCoord[6]; // okay, assigning a size
varying vec4 gl_TexCoord[5]; // ERROR, changing size

View File

@@ -27,7 +27,8 @@ ERROR: 0:94: 'a' : variables with qualifier 'const' must be initialized
ERROR: 0:97: 'out' : overloaded functions must have the same parameter qualifiers
ERROR: 0:99: 'return' : function return is not matching type:
ERROR: 0:115: 'return' : void function cannot return a value
ERROR: 29 compilation errors. No code generated.
ERROR: 0:125: 'gl_TexCoord' : redeclaration of array with size
ERROR: 30 compilation errors. No code generated.
ERROR: node is still EOpNull!
0:21 Function Definition: main( (void)
@@ -265,6 +266,20 @@ ERROR: node is still EOpNull!
0:115 Sequence
0:115 Branch: Return with expression
0:115 Function Call: v1( (void)
0:118 Function Definition: atest( (void)
0:118 Function Parameters:
0:120 Sequence
0:120 Sequence
0:120 move second child to first child (4-component vector of float)
0:120 'v' (4-component vector of float)
0:120 direct index (smooth in 4-component vector of float)
0:120 'gl_TexCoord' (smooth in unsized array of 4-component vector of float)
0:120 1 (const int)
0:121 add second child into first child (4-component vector of float)
0:121 'v' (4-component vector of float)
0:121 direct index (smooth in 4-component vector of float)
0:121 'gl_TexCoord' (smooth in unsized array of 4-component vector of float)
0:121 3 (const int)
0:? Linker Objects
0:? 'i' (smooth in 4-component vector of float)
0:? 'o' (out 4-component vector of float)

View File

@@ -134,7 +134,7 @@ ERROR: node is still EOpNull!
0:? 'rep2' (centroid smooth sample out highp 4-component vector of float)
0:? 'rep3' (in highp 4-component vector of float)
0:? 's' (smooth out structure)
0:? 'ubInst' (layout(shared ) uniform 1-element array of block)
0:? 'ubInst' (layout(shared ) uniform unsized array of block)
0:? 'gl_VertexID' (gl_VertexId highp int)
0:? 'gl_InstanceID' (gl_InstanceId highp int)

View File

@@ -5,7 +5,7 @@ ERROR: 0:9: 'arrayed type' : not supported for this version or the enabled exten
ERROR: 0:11: 'arrayed constructor' : not supported for this version or the enabled extensions
ERROR: 0:21: '[' : array index out of range '2'
ERROR: 0:25: 'assign' : cannot convert from '4-element array of mediump float' to '5-element array of mediump float'
ERROR: 0:26: 'assign' : cannot convert from '4-element array of mediump float' to '1-element array of mediump float'
ERROR: 0:26: 'assign' : cannot convert from '4-element array of mediump float' to 'unsized array of mediump float'
ERROR: 0:28: 'foo' : no matching overloaded function found
ERROR: 0:31: 'arrayed constructor' : not supported for this version or the enabled extensions
ERROR: 0:35: '[' : array index out of range '5'
@@ -49,7 +49,7 @@ ERROR: node is still EOpNull!
0:24 Function Call: foo(f1[5]; (4-element array of mediump float)
0:24 'g5' (5-element array of mediump float)
0:25 'g5' (5-element array of mediump float)
0:26 'gu' (1-element array of mediump float)
0:26 'gu' (unsized array of mediump float)
0:28 0.000000
0:29 Function Call: bar(f1[5]; (void)
0:29 'g5' (5-element array of mediump float)
@@ -64,7 +64,7 @@ ERROR: node is still EOpNull!
0:31 true case
0:32 move second child to first child (mediump float)
0:32 direct index (mediump float)
0:32 'gu' (1-element array of mediump float)
0:32 'gu' (unsized array of mediump float)
0:32 0 (const int)
0:32 2.000000
0:35 move second child to first child (mediump float)