skia2/tests/sksl/shared/SwizzleBoolConstants.sksl
John Stiles aeae3a58e3 Add golden outputs for the Metal backend.
This CL also updates the blend tests to use sk_FragColor instead of
returning a half4, as the Metal backend assumes that a fragment
processor's `main` will return void and always synthesizes a
`return *_out;` at the end.

(context link:
https://osscs.corp.google.com/android/platform/superproject/+/master:external/skqp/src/sksl/SkSLMetalCodeGenerator.cpp;l=803;drc=842d31b14159626054e01dd32826563a8f4214bf )

BYPASS_INCLUSIVE_LANGUAGE_REASON=see http://b/168134166

Change-Id: I330a456bf25ee72d3a29c59cd624625378ae80a0
Bug: skia:10649, skia:10757, skia:10758, skia:10759, skia:10760, skia:10761, skia:10762
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319409
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-09-25 17:46:43 +00:00

33 lines
833 B
Plaintext

void main() {
bool4 v = bool4(sqrt(1) == 1);
bool4 result;
result = bool4(v.x, true, true, true);
result = bool4(v.xy, false, true);
result = bool4(v.x1, true, false);
result = bool4(v.0y, true, true);
result = bool4(v.xyz, true);
result = bool4(v.xy1, true);
result = bool4(v.x0z, true);
result = bool4(v.x10, false);
result = bool4(v.1yz, false);
result = bool4(v.0y1, false);
result = bool4(v.11z, false);
result = v.xyzw;
result = v.xyz1;
result = v.xy0w;
result = v.xy10;
result = v.x1zw;
result = v.x0z1;
result = v.x11w;
result = v.x101;
result = v.1yzw;
result = v.0yz1;
result = v.0y1w;
result = v.1y11;
result = v.00zw;
result = v.00z1;
result = v.011w;
sk_FragColor = any(result) ? half4(1) : half4(0);
}