Implement barrier() control-flow rules: in flow control, non-main, and post-return.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@29347 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2015-01-07 06:14:06 +00:00
parent cbc7dd979a
commit 05a62bf528
8 changed files with 426 additions and 181 deletions

View File

@@ -34,6 +34,31 @@ void main()
gl_TessLevelOuter[3] = 3.2;
gl_TessLevelInner[1] = 1.3;
if (a > 10)
barrier(); // ERROR
else
barrier(); // ERROR
barrier();
do {
barrier(); // ERROR
} while (a > 10);
switch (a) {
default:
barrier(); // ERROR
break;
}
{
barrier();
}
return;
barrier(); // ERROR
}
layout(vertices = 4) in; // ERROR
@@ -42,6 +67,8 @@ layout(vertices = 5) out; // ERROR
void foo()
{
gl_out[4].gl_PointSize; // ERROR
barrier(); // ERROR
}
in vec2 ina; // ERROR, not array