skia2/tests/sksl/errors/InvalidOutParams.sksl
John Stiles 59b2a92c96 Add new unit tests for SkSL.
These cover:
- Properly configured out-params
- Invalid/non-lvalue out-params, which currently cause an SkSL crash
- Interactions between the inliner and variable swizzles

Change-Id: I4874101236084f273e704d8717149b431d813883
Bug: skia:10753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319036
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-23 20:30:47 +00:00

7 lines
172 B
Plaintext

void inc1(out float x) { x++; }
void inc4(out float4 x) { x += half4(1); }
void test_a() { inc1(0); }
void test_b() { inc4(float4(0)); }
void test_c() { inc1(sqrt(1)); }