Put in infrastructure for tessellation, geometry, and compute stages, and partially flesh out with built-in functions.

Added the built-in functions EmitVertex(), EndPrimitive(), barrier(), memoryBarrier(), memoryBarrierAtomicCounter(), memoryBarrierBuffer(), memoryBarrierImage(), memoryBarrierShared(), and groupMemoryBarrier().

Have not added any new built-in variables.

Also changed the linear performance relateToOperator() to a high-performance version.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22659 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-08-09 17:14:49 +00:00
parent 317f1af217
commit c027579631
28 changed files with 520 additions and 299 deletions

9
Test/150.geom Normal file
View File

@@ -0,0 +1,9 @@
#version 150 core
void main()
{
EmitVertex();
EndPrimitive();
EmitStreamVertex(1); // ERROR
EndStreamPrimitive(0); // ERROR
}

9
Test/400.geom Normal file
View File

@@ -0,0 +1,9 @@
#version 400 core
void main()
{
EmitStreamVertex(1);
EndStreamPrimitive(0);
EmitVertex();
EndPrimitive();
}

6
Test/400.tesc Normal file
View File

@@ -0,0 +1,6 @@
#version 400 core
void main()
{
barrier();
}

6
Test/400.tese Normal file
View File

@@ -0,0 +1,6 @@
#version 400 core
void main()
{
barrier(); // ERROR
}

6
Test/420.tese Normal file
View File

@@ -0,0 +1,6 @@
#version 420 core
void main()
{
memoryBarrier();
}

10
Test/430.comp Normal file
View File

@@ -0,0 +1,10 @@
#version 430 core
void main()
{
memoryBarrierAtomicCounter();
memoryBarrierBuffer();
memoryBarrierShared();
memoryBarrierImage();
groupMemoryBarrier();
}

View File

@@ -230,6 +230,28 @@ ERROR: node is still EOpNull!
0:98 3.200000
0:99 Function Call: foo(f1; (int)
0:99 'a' (out float)
0:102 Function Definition: gen(vf3; (bool)
0:102 Function Parameters:
0:102 'v' (in 3-component vector of float)
0:104 Sequence
0:104 Test condition and select (void)
0:104 Condition
0:104 logical-and (bool)
0:104 Compare Less Than (bool)
0:104 Absolute value (float)
0:104 direct index (in float)
0:104 'v' (in 3-component vector of float)
0:104 0 (const int)
0:104 0.000100
0:104 Compare Less Than (bool)
0:104 Absolute value (float)
0:104 direct index (in float)
0:104 'v' (in 3-component vector of float)
0:104 1 (const int)
0:104 0.000100
0:104 true case
0:105 Branch: Return with expression
0:105 true (const bool)
0:? Linker Objects
0:? 'i' (smooth in 4-component vector of float)
0:? 'o' (out 4-component vector of float)

View File

@@ -0,0 +1,10 @@
0:3Function Definition: main( (void)
0:3 Function Parameters:
0:5 Sequence
0:5 EmitStreamVertex (void)
0:5 1 (const int)
0:6 EndStreamPrimitive (void)
0:6 0 (const int)
0:7 EmitVertex (void)
0:8 EndPrimitive (void)

View File

@@ -0,0 +1,5 @@
0:3Function Definition: main( (void)
0:3 Function Parameters:
0:5 Sequence
0:5 Barrier (void)

View File

@@ -0,0 +1,8 @@
ERROR: 0:5: 'barrier' : no matching overloaded function found
ERROR: 1 compilation errors. No code generated.
0:3Function Definition: main( (void)
0:3 Function Parameters:
0:5 Sequence
0:5 0.000000

View File

@@ -0,0 +1,5 @@
0:3Function Definition: main( (void)
0:3 Function Parameters:
0:5 Sequence
0:5 MemoryBarrier (void)

View File

@@ -0,0 +1,9 @@
0:3Function Definition: main( (void)
0:3 Function Parameters:
0:5 Sequence
0:5 MemoryBarrierAtomicCounter (void)
0:6 MemoryBarrierBuffer (void)
0:7 MemoryBarrierShared (void)
0:8 MemoryBarrierImage (void)
0:9 GroupMemoryBarrier (void)

View File

@@ -160,65 +160,60 @@
0:87 'v' (4-component vector of float)
0:88 add second child into first child (4-component vector of float)
0:88 'v' (4-component vector of float)
0:88 normalize (4-component vector of float)
0:88 step (4-component vector of float)
0:88 'uf' (uniform float)
0:88 'v' (4-component vector of float)
0:89 add second child into first child (4-component vector of float)
0:89 'v' (4-component vector of float)
0:89 face-forward (4-component vector of float)
0:89 'v' (4-component vector of float)
0:89 'v' (4-component vector of float)
0:89 smoothstep (4-component vector of float)
0:89 'uf' (uniform float)
0:89 'uf' (uniform float)
0:89 'v' (4-component vector of float)
0:90 add second child into first child (4-component vector of float)
0:90 'v' (4-component vector of float)
0:90 reflect (4-component vector of float)
0:90 'v' (4-component vector of float)
0:90 normalize (4-component vector of float)
0:90 'v' (4-component vector of float)
0:91 add second child into first child (4-component vector of float)
0:91 'v' (4-component vector of float)
0:91 refract (4-component vector of float)
0:91 face-forward (4-component vector of float)
0:91 'v' (4-component vector of float)
0:91 'v' (4-component vector of float)
0:91 'v' (4-component vector of float)
0:91 'uf' (uniform float)
0:92 add second child into first child (4-component vector of float)
0:92 'v' (4-component vector of float)
0:92 dPdx (4-component vector of float)
0:92 reflect (4-component vector of float)
0:92 'v' (4-component vector of float)
0:92 'v' (4-component vector of float)
0:93 add second child into first child (4-component vector of float)
0:93 'v' (4-component vector of float)
0:93 dPdy (4-component vector of float)
0:93 refract (4-component vector of float)
0:93 'v' (4-component vector of float)
0:93 'v' (4-component vector of float)
0:93 'uf' (uniform float)
0:94 add second child into first child (4-component vector of float)
0:94 'v' (4-component vector of float)
0:94 fwidth (4-component vector of float)
0:94 dPdx (4-component vector of float)
0:94 'v' (4-component vector of float)
0:128 move second child to first child (bool)
0:128 'b' (bool)
0:128 any (bool)
0:128 Compare Less Than (4-component vector of bool)
0:128 'v' (4-component vector of float)
0:128 'uv4' (uniform 4-component vector of float)
0:129 move second child to first child (bool)
0:129 'b' (bool)
0:129 logical-and (bool)
0:129 'b' (bool)
0:129 any (bool)
0:129 Compare Less Than or Equal (4-component vector of bool)
0:129 'v' (4-component vector of float)
0:129 'uv4' (uniform 4-component vector of float)
0:95 add second child into first child (4-component vector of float)
0:95 'v' (4-component vector of float)
0:95 dPdy (4-component vector of float)
0:95 'v' (4-component vector of float)
0:96 add second child into first child (4-component vector of float)
0:96 'v' (4-component vector of float)
0:96 fwidth (4-component vector of float)
0:96 'v' (4-component vector of float)
0:130 move second child to first child (bool)
0:130 'b' (bool)
0:130 logical-and (bool)
0:130 'b' (bool)
0:130 any (bool)
0:130 Compare Greater Than (4-component vector of bool)
0:130 'v' (4-component vector of float)
0:130 'uv4' (uniform 4-component vector of float)
0:130 any (bool)
0:130 Compare Less Than (4-component vector of bool)
0:130 'v' (4-component vector of float)
0:130 'uv4' (uniform 4-component vector of float)
0:131 move second child to first child (bool)
0:131 'b' (bool)
0:131 logical-and (bool)
0:131 'b' (bool)
0:131 any (bool)
0:131 Compare Greater Than or Equal (4-component vector of bool)
0:131 Compare Less Than or Equal (4-component vector of bool)
0:131 'v' (4-component vector of float)
0:131 'uv4' (uniform 4-component vector of float)
0:132 move second child to first child (bool)
@@ -226,177 +221,193 @@
0:132 logical-and (bool)
0:132 'b' (bool)
0:132 any (bool)
0:132 Equal (4-component vector of bool)
0:132 'ub41' (uniform 4-component vector of bool)
0:132 'ub42' (uniform 4-component vector of bool)
0:132 Compare Greater Than (4-component vector of bool)
0:132 'v' (4-component vector of float)
0:132 'uv4' (uniform 4-component vector of float)
0:133 move second child to first child (bool)
0:133 'b' (bool)
0:133 logical-and (bool)
0:133 'b' (bool)
0:133 any (bool)
0:133 NotEqual (4-component vector of bool)
0:133 'ub41' (uniform 4-component vector of bool)
0:133 'ub42' (uniform 4-component vector of bool)
0:133 Compare Greater Than or Equal (4-component vector of bool)
0:133 'v' (4-component vector of float)
0:133 'uv4' (uniform 4-component vector of float)
0:134 move second child to first child (bool)
0:134 'b' (bool)
0:134 logical-and (bool)
0:134 'b' (bool)
0:134 any (bool)
0:134 'ub41' (uniform 4-component vector of bool)
0:134 Equal (4-component vector of bool)
0:134 'ub41' (uniform 4-component vector of bool)
0:134 'ub42' (uniform 4-component vector of bool)
0:135 move second child to first child (bool)
0:135 'b' (bool)
0:135 logical-and (bool)
0:135 'b' (bool)
0:135 all (bool)
0:135 'ub41' (uniform 4-component vector of bool)
0:135 any (bool)
0:135 NotEqual (4-component vector of bool)
0:135 'ub41' (uniform 4-component vector of bool)
0:135 'ub42' (uniform 4-component vector of bool)
0:136 move second child to first child (bool)
0:136 'b' (bool)
0:136 logical-and (bool)
0:136 'b' (bool)
0:136 any (bool)
0:136 Negate conditional (4-component vector of bool)
0:136 'ub41' (uniform 4-component vector of bool)
0:138 move second child to first child (int)
0:138 'i' (int)
0:138 divide (int)
0:138 subtract (int)
0:138 component-wise multiply (int)
0:138 add (int)
0:138 'i' (int)
0:138 'ui' (uniform int)
0:138 'i' (int)
0:138 'ui' (uniform int)
0:138 'i' (int)
0:139 move second child to first child (int)
0:139 'i' (int)
0:139 mod (int)
0:139 'i' (int)
0:139 'ui' (uniform int)
0:140 Test condition and select (void)
0:140 Condition
0:140 logical-or (bool)
0:140 Compare Equal (bool)
0:140 'i' (int)
0:140 'ui' (uniform int)
0:140 logical-xor (bool)
0:140 logical-and (bool)
0:140 Compare Not Equal (bool)
0:136 'ub41' (uniform 4-component vector of bool)
0:137 move second child to first child (bool)
0:137 'b' (bool)
0:137 logical-and (bool)
0:137 'b' (bool)
0:137 all (bool)
0:137 'ub41' (uniform 4-component vector of bool)
0:138 move second child to first child (bool)
0:138 'b' (bool)
0:138 logical-and (bool)
0:138 'b' (bool)
0:138 any (bool)
0:138 Negate conditional (4-component vector of bool)
0:138 'ub41' (uniform 4-component vector of bool)
0:140 move second child to first child (int)
0:140 'i' (int)
0:140 divide (int)
0:140 subtract (int)
0:140 component-wise multiply (int)
0:140 add (int)
0:140 'i' (int)
0:140 'ui' (uniform int)
0:140 Compare Equal (bool)
0:140 'i' (int)
0:140 'ui' (uniform int)
0:140 Compare Not Equal (bool)
0:140 'i' (int)
0:140 2 (const int)
0:140 true case
0:141 Pre-Increment (int)
0:140 'ui' (uniform int)
0:140 'i' (int)
0:141 move second child to first child (int)
0:141 'i' (int)
0:141 mod (int)
0:141 'i' (int)
0:143 move second child to first child (float)
0:143 'f' (float)
0:143 divide (float)
0:143 subtract (float)
0:143 component-wise multiply (float)
0:143 add (float)
0:143 'uf' (uniform float)
0:143 'uf' (uniform float)
0:143 'uf' (uniform float)
0:143 'uf' (uniform float)
0:143 'uf' (uniform float)
0:145 add second child into first child (float)
0:141 'ui' (uniform int)
0:142 Test condition and select (void)
0:142 Condition
0:142 logical-or (bool)
0:142 Compare Equal (bool)
0:142 'i' (int)
0:142 'ui' (uniform int)
0:142 logical-xor (bool)
0:142 logical-and (bool)
0:142 Compare Not Equal (bool)
0:142 'i' (int)
0:142 'ui' (uniform int)
0:142 Compare Equal (bool)
0:142 'i' (int)
0:142 'ui' (uniform int)
0:142 Compare Not Equal (bool)
0:142 'i' (int)
0:142 2 (const int)
0:142 true case
0:143 Pre-Increment (int)
0:143 'i' (int)
0:145 move second child to first child (float)
0:145 'f' (float)
0:145 length (float)
0:145 'v' (4-component vector of float)
0:146 add second child into first child (float)
0:146 'f' (float)
0:146 distance (float)
0:146 'v' (4-component vector of float)
0:146 'v' (4-component vector of float)
0:145 divide (float)
0:145 subtract (float)
0:145 component-wise multiply (float)
0:145 add (float)
0:145 'uf' (uniform float)
0:145 'uf' (uniform float)
0:145 'uf' (uniform float)
0:145 'uf' (uniform float)
0:145 'uf' (uniform float)
0:147 add second child into first child (float)
0:147 'f' (float)
0:147 dot-product (float)
0:147 'v' (4-component vector of float)
0:147 length (float)
0:147 'v' (4-component vector of float)
0:148 add second child into first child (float)
0:148 'f' (float)
0:148 dot-product (float)
0:148 'f' (float)
0:148 'uf' (uniform float)
0:148 distance (float)
0:148 'v' (4-component vector of float)
0:148 'v' (4-component vector of float)
0:149 add second child into first child (float)
0:149 'f' (float)
0:149 direct index (float)
0:149 cross-product (3-component vector of float)
0:149 vector swizzle (3-component vector of float)
0:149 'v' (4-component vector of float)
0:149 Sequence
0:149 0 (const int)
0:149 1 (const int)
0:149 2 (const int)
0:149 vector swizzle (3-component vector of float)
0:149 'v' (4-component vector of float)
0:149 Sequence
0:149 0 (const int)
0:149 1 (const int)
0:149 2 (const int)
0:149 0 (const int)
0:151 Test condition and select (void)
0:151 Condition
0:151 logical-or (bool)
0:151 Compare Equal (bool)
0:151 'f' (float)
0:151 'uf' (uniform float)
0:151 logical-and (bool)
0:151 Compare Not Equal (bool)
0:151 'f' (float)
0:151 'uf' (uniform float)
0:151 Compare Not Equal (bool)
0:151 'f' (float)
0:151 2.000000
0:151 true case
0:152 Pre-Increment (float)
0:152 'f' (float)
0:154 and second child into first child (int)
0:154 'i' (int)
0:154 'ui' (uniform int)
0:155 or second child into first child (int)
0:155 'i' (int)
0:155 66 (const int)
0:156 exclusive or second child into first child (int)
0:149 dot-product (float)
0:149 'v' (4-component vector of float)
0:149 'v' (4-component vector of float)
0:150 add second child into first child (float)
0:150 'f' (float)
0:150 dot-product (float)
0:150 'f' (float)
0:150 'uf' (uniform float)
0:151 add second child into first child (float)
0:151 'f' (float)
0:151 direct index (float)
0:151 cross-product (3-component vector of float)
0:151 vector swizzle (3-component vector of float)
0:151 'v' (4-component vector of float)
0:151 Sequence
0:151 0 (const int)
0:151 1 (const int)
0:151 2 (const int)
0:151 vector swizzle (3-component vector of float)
0:151 'v' (4-component vector of float)
0:151 Sequence
0:151 0 (const int)
0:151 1 (const int)
0:151 2 (const int)
0:151 0 (const int)
0:153 Test condition and select (void)
0:153 Condition
0:153 logical-or (bool)
0:153 Compare Equal (bool)
0:153 'f' (float)
0:153 'uf' (uniform float)
0:153 logical-and (bool)
0:153 Compare Not Equal (bool)
0:153 'f' (float)
0:153 'uf' (uniform float)
0:153 Compare Not Equal (bool)
0:153 'f' (float)
0:153 2.000000
0:153 true case
0:154 Pre-Increment (float)
0:154 'f' (float)
0:156 and second child into first child (int)
0:156 'i' (int)
0:156 'ui' (uniform int)
0:157 mod second child into first child (int)
0:157 or second child into first child (int)
0:157 'i' (int)
0:157 17 (const int)
0:158 right shift second child into first child (int)
0:157 66 (const int)
0:158 exclusive or second child into first child (int)
0:158 'i' (int)
0:158 2 (const int)
0:159 left shift second child into first child (int)
0:158 'ui' (uniform int)
0:159 mod second child into first child (int)
0:159 'i' (int)
0:159 'ui' (uniform int)
0:160 move second child to first child (int)
0:159 17 (const int)
0:160 right shift second child into first child (int)
0:160 'i' (int)
0:160 Bitwise not (int)
0:160 'i' (int)
0:161 move second child to first child (bool)
0:161 'b' (bool)
0:161 Negate conditional (bool)
0:161 'b' (bool)
0:163 move second child to first child (4-component vector of float)
0:163 'gl_FragColor' (fragColor 4-component vector of float)
0:163 Test condition and select (4-component vector of float)
0:163 Condition
0:160 2 (const int)
0:161 left shift second child into first child (int)
0:161 'i' (int)
0:161 'ui' (uniform int)
0:162 move second child to first child (int)
0:162 'i' (int)
0:162 Bitwise not (int)
0:162 'i' (int)
0:163 move second child to first child (bool)
0:163 'b' (bool)
0:163 Negate conditional (bool)
0:163 'b' (bool)
0:163 true case
0:163 add (4-component vector of float)
0:163 add (4-component vector of float)
0:163 Construct vec4 (4-component vector of float)
0:163 Convert int to float (float)
0:163 'i' (int)
0:163 Construct vec4 (4-component vector of float)
0:163 'f' (float)
0:163 'v' (4-component vector of float)
0:163 false case
0:163 'v' (4-component vector of float)
0:165 move second child to first child (4-component vector of float)
0:165 'gl_FragColor' (fragColor 4-component vector of float)
0:165 Test condition and select (4-component vector of float)
0:165 Condition
0:165 'b' (bool)
0:165 true case
0:165 add (4-component vector of float)
0:165 add (4-component vector of float)
0:165 Construct vec4 (4-component vector of float)
0:165 Convert int to float (float)
0:165 'i' (int)
0:165 Construct vec4 (4-component vector of float)
0:165 'f' (float)
0:165 'v' (4-component vector of float)
0:165 false case
0:165 'v' (4-component vector of float)
0:? Linker Objects
0:? 'uiv4' (uniform 4-component vector of int)
0:? 'uv4' (uniform 4-component vector of float)

View File

@@ -44,6 +44,11 @@ tokenLength.vert
430scope.vert
lineContinuation.vert
numeral.frag
400.geom
400.tesc
400.tese
420.tese
430.comp
../../LunarGLASS/test/aggOps.frag
../../LunarGLASS/test/always-discard.frag
../../LunarGLASS/test/always-discard2.frag