skia2/resources/sksl/runtime_errors/IllegalShaderUse.rts
Brian Osman cbfa34a58c Convert internal SkSL to use .eval()
Also update RELEASE_NOTES to describe new syntax.

Change-Id: I2666551b98f80b61ae3a48c92a9e306cdc7242b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444735
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-03 15:54:54 +00:00

19 lines
583 B
Plaintext

// Expect >= 7 errors (currently 9, due to double-reporting)
// Correct declaration (used in some test functions)
uniform shader s1;
uniform shader s2;
uniform float2 xy;
// Incorrect shader declarations (they must be uniform)
shader s3;
in shader s4;
// Various places that shaders should not be allowed:
half4 local() { shader s; return s.eval(xy); }
half4 parameter(shader s) { return s.eval(xy); }
shader returned() { return s1; }
half4 constructed() { return shader(s1).eval(xy); }
half4 expression(bool b) { return (b ? s1 : s2).eval(xy); }