skia2/resources/sksl
Brian Salomon d8d85b9b89 Reland "Don't key progams/pipelines on origin.""
Reland works around Adreno issue with this formulation of sk_Clockwise:
 (sk_RTFlip.y < 0.0 ? !gl_FrontFacing : gl_FrontFacing)

and instead adds this to the top of the function:
 bool sk_Clockwise = gl_FrontFacing;
 if (sk_RTFlip.y < 0.0) {
      sk_Clockwise = !sk_Clockwise;
 }

Original description:

SkSL language features that are origin sensitive now use a uniform
to conditionally flip their result rather than generating different
code.

Previously we would insert a "rt height" uniform if sk_FragCoord needed
to be flipped. sk_FragCoord,y was implemented as "realFragCoord.y" or
"rtHeight - realFragCoord.y" depending on SkSL::ProgramSettings::fFlipY.

Now we instead use a two component vector rtFlip and sk_FragCoord.y is
always "rtFlip.x + rtFlip.y*realFragCoord.y". We configure rtFlip as
either (0, 1) or (rtHeight, -1). sk_Clockwise and dFdy simiarly use
rtFlip.y to emit code that always works with either origin.

Bug: skia:12037
Change-Id: I3a2ad6f5667eb4dcd823b939abd5698f89b58929
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425178
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-07-07 14:50:10 +00:00
..
blend Remove SkBlendMode from SkSL 2021-06-16 21:01:30 +00:00
dslfp Add support for uint types in DSL C++ code generation. 2021-05-10 18:43:52 +00:00
errors Remove SkBlendMode from SkSL 2021-06-16 21:01:30 +00:00
folding Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
fp Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
glsl Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
inliner Loosen ES3 restrictions in Runtime Effects for debugging. 2021-04-28 19:59:36 +00:00
intrinsics Implement compile-time optimization for mix(). 2021-06-01 19:36:05 +00:00
metal Enable proper testing of matrix-scalar ops. 2021-05-17 17:36:22 +00:00
runtime Add dest-color support to the Pipeline stage. 2021-06-09 22:09:21 +00:00
runtime_errors Fix for fuzzer-discovered out-of-bounds array access. 2021-06-10 14:32:10 +00:00
shared Reland "Don't key progams/pipelines on origin."" 2021-07-07 14:50:10 +00:00
spirv Enable proper testing of matrix-scalar ops. 2021-05-17 17:36:22 +00:00
workarounds Add a workaround for "ldexp(..., -x)" on Mac/Radeon/GLSL 2021-06-08 01:39:38 +00:00
README.txt Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00

This directory contains source files for testing skslc compilation.
The compiled output files are in the /tests/sksl/ directory.