Desktop array size limit checking for gl_ClipDistance[] and gl_TexCoord[].

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24397 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-12-06 23:57:42 +00:00
parent 64bcb105c9
commit 5f15d4224a
8 changed files with 40 additions and 8 deletions

View file

@ -117,3 +117,5 @@ void foo()
overloadF(1, 1); // ERROR
overloadF(1);
}
varying vec4 gl_TexCoord[35]; // ERROR, size too big

View file

@ -40,3 +40,5 @@ struct S {
layout(location = 10) out S cs[2]; // 10 through 10 + 2 * 22 - 1 = 53
layout(location = 54) out float cf;
layout(location = 53) out float cg; // ERROR, collision at 31
float gl_ClipDistance[17]; // ERROR, size too big

View file

@ -43,7 +43,8 @@ ERROR: 0:107: 'overloadE' : no matching overloaded function found
ERROR: 0:108: 'overloadE' : no matching overloaded function found
ERROR: 0:111: 'overloadE' : no matching overloaded function found
ERROR: 0:117: 'overloadF' : no matching overloaded function found
ERROR: 44 compilation errors. No code generated.
ERROR: 0:121: 'gl_TexCoord array size' : must be less than gl_MaxTextureCoords (32)
ERROR: 45 compilation errors. No code generated.
ERROR: node is still EOpNull!
@ -201,6 +202,8 @@ ERROR: node is still EOpNull!
0:? 3.400000
0:? 'concall' (const float)
0:? 0.295520
0:? 'gl_TexCoord' (smooth out 35-element array of 4-component vector of float)
0:? 'gl_TexCoord' (smooth out 35-element array of 4-component vector of float)
Linked vertex stage:

View file

@ -12,7 +12,8 @@ ERROR: 0:28: '' : cannot use invariant qualifier on a function parameter
ERROR: 0:30: '' : cannot use layout qualifiers on a function parameter
ERROR: 0:31: '' : cannot use auxiliary or interpolation qualifiers on a function parameter
ERROR: 0:42: 'location' : repeated use of location 53
ERROR: 12 compilation errors. No code generated.
ERROR: 0:44: 'gl_ClipDistance array size' : must be less than gl_MaxClipDistances (8)
ERROR: 13 compilation errors. No code generated.
ERROR: node is still EOpNull!
@ -21,7 +22,7 @@ ERROR: node is still EOpNull!
0:16 Sequence
0:16 move second child to first child (float)
0:16 direct index (float)
0:16 gl_ClipDistance: direct index for structure (unsized array of float)
0:16 gl_ClipDistance: direct index for structure (17-element array of float)
0:16 '__anon__0' (out block{gl_ClipDistance})
0:16 Constant:
0:16 0 (const uint)