skia2/resources/sksl/runtime_errors/InvalidShaderMain.rts
John Stiles 9c19b9f1ff Fix for fuzzer-discovered out-of-bounds array access.
Change-Id: I4280b5710dd8749ba766ba74d7a8886bc4e024bb
Bug: oss-fuzz:35124
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417200
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-06-10 14:32:10 +00:00

12 lines
464 B
Plaintext

// Runtime shaders require specific main signatures. Test that older signatures, or those intended
// for color filters don't work.
// Expect 4 errors
half4 main() { return half4(1); }
half4 main(half4 color) { return color; }
half4 main(float2 xy, half4 color, half4 bonusColor) { return color; }
half4 main(half4 outOfOrderColor, float2 outOfOrderXy) { return color; }
half4 main(float2 xy, half4 color) { return color; } // the correct signature is allowed