GLSL: Implement GL_EXT_control_flow_attributes.

See https://github.com/KhronosGroup/GLSL/pull/11.
This commit is contained in:
John Kessenich
2018-01-31 08:11:18 -07:00
parent e18fd20d5c
commit a2858d9bdd
21 changed files with 3120 additions and 2405 deletions

View File

@@ -15,3 +15,18 @@ void main()
b1 = allInvocations(b1);
b1 = allInvocationsEqual(b1);
}
void attExtBad()
{
// ERRORs, not enabled
[[dependency_length(1+3)]] for (int i = 0; i < 8; ++i) { }
[[flatten]] if (true) { } else { }
}
#extension GL_EXT_control_flow_attributes : enable
void attExt()
{
[[dependency_length(-3)]] do { } while(true); // ERROR, not positive
[[dependency_length(0)]] do { } while(true); // ERROR, not positive
}