xref: /aosp_15_r20/external/skia/resources/sksl/shared/OutParamsFunctionCallInArgument.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1uniform half4 colorGreen, colorRed;
2
3void out_param_func1(inout half v) {
4    v = colorGreen.g;
5}
6
7int out_param_func2(out half v) {
8    v = colorRed.r;
9    return int(v);
10}
11
12half4 main(float2 c) {
13    half testArray[2];
14    out_param_func1(testArray[out_param_func2(testArray[0])]);
15    return (testArray[0] == 1 && testArray[1] == 1) ? colorGreen : colorRed;
16}
17