skia2/resources/sksl/shared/OutParamsAreDistinct.sksl
John Stiles c3d8062555 Fix up SkSL test on Wembley.
Test "InlinerHonorsGLSLOutParamSemantics" was failing on Wembley devices
and is now disabled on that GPU.

Also, it turns out that the inliner has ignored functions with out
params for a long time now, but our test names haven't been updated to
account for this. So, did some additional cleanup:
- "InlinerHonorsGLSLOutParamSemantics" (the test in question) has been
  moved to shared/ and renamed to "OutParamsAreDistinct."
- Removed test "OutParamsNoInline" as it is functionally the same as
  "OutParams".

Change-Id: I1431ed197b9216cb482eee4f5e4eb2579a5303f7
Bug: skia:12858
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502303
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-01-31 21:17:40 +00:00

13 lines
258 B
Plaintext

uniform half4 colorGreen, colorRed;
bool out_params_are_distinct(out half x, out half y) {
x = 1;
y = 2;
return x == 1 && y == 2;
}
half4 main(float2 coords) {
half x = 0;
return out_params_are_distinct(x, x) ? colorGreen : colorRed;
}