2021-04-06 18:28:07 +00:00
|
|
|
// Expect >= 7 errors (currently 9, due to double-reporting)
|
2021-04-06 17:21:08 +00:00
|
|
|
|
|
|
|
// Correct declaration (used in some test functions)
|
|
|
|
uniform shader s1;
|
|
|
|
uniform shader s2;
|
|
|
|
|
2021-04-28 21:41:57 +00:00
|
|
|
uniform float2 xy;
|
|
|
|
|
2021-04-06 17:21:08 +00:00
|
|
|
// Incorrect shader declarations (they must be uniform)
|
|
|
|
shader s3;
|
|
|
|
in shader s4;
|
|
|
|
|
|
|
|
// Various places that shaders should not be allowed:
|
2021-09-02 13:26:27 +00:00
|
|
|
half4 local() { shader s; return s.eval(xy); }
|
|
|
|
half4 parameter(shader s) { return s.eval(xy); }
|
2021-04-06 17:21:08 +00:00
|
|
|
shader returned() { return s1; }
|
2021-09-02 13:26:27 +00:00
|
|
|
half4 constructed() { return shader(s1).eval(xy); }
|
|
|
|
half4 expression(bool b) { return (b ? s1 : s2).eval(xy); }
|