skia2/tests/sksl/workarounds
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
..
AbsInt.glsl
AbsIntStandaloneSettings.glsl
BlendGuardedDivide.glsl
BlendGuardedDivideStandaloneSettings.glsl
BlendModesAllZeroVec.glsl
BlendModesAllZeroVecStandaloneSettings.glsl
FractNegative.glsl
FractNegativeStandaloneSettings.glsl
FragCoords.glsl
FragCoordsStandaloneSettings.glsl Reland "Don't key progams/pipelines on origin."" 2021-07-07 14:50:10 +00:00
LoopCondition.glsl
LoopConditionStandaloneSettings.glsl
MinAndAbsTogether.glsl
MinAndAbsTogetherStandaloneSettings.glsl
NegatedAtan.glsl Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
NegatedAtanStandaloneSettings.glsl Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
NegatedLdexp.glsl Add a workaround for "ldexp(..., -x)" on Mac/Radeon/GLSL 2021-06-08 01:39:38 +00:00
NegatedLdexpStandaloneSettings.glsl Add a workaround for "ldexp(..., -x)" on Mac/Radeon/GLSL 2021-06-08 01:39:38 +00:00
PowWithConstantExponent.glsl
PowWithConstantExponentStandaloneSettings.glsl
RewriteDoWhileLoops.glsl
RewriteDoWhileLoopsStandaloneSettings.glsl
RewriteMatrixComparisons.glsl Rewrite matrix comparisons to work around Adreno bug. 2021-05-24 13:42:19 +00:00
RewriteMatrixComparisonsStandaloneSettings.glsl Rename caps bit for matrix comparison rewrites. 2021-05-21 22:31:53 +00:00
RewriteMatrixVectorMultiply.asm.frag
RewriteMatrixVectorMultiply.glsl
RewriteMatrixVectorMultiplyStandaloneSettings.glsl
TernaryShortCircuit.glsl
TernaryShortCircuitStandaloneSettings.glsl