943108b0b2
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: I7a09d0caac60a58d72b76645ff31bcabde4086b6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414796 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> |
||
---|---|---|
.. | ||
AbsInt.glsl | ||
AbsIntStandaloneSettings.glsl | ||
BlendGuardedDivide.glsl | ||
BlendGuardedDivideStandaloneSettings.glsl | ||
BlendModesAllZeroVec.glsl | ||
BlendModesAllZeroVecStandaloneSettings.glsl | ||
FractNegative.glsl | ||
FractNegativeStandaloneSettings.glsl | ||
FragCoords.glsl | ||
FragCoordsStandaloneSettings.glsl | ||
LoopCondition.glsl | ||
LoopConditionStandaloneSettings.glsl | ||
MinAndAbsTogether.glsl | ||
MinAndAbsTogetherStandaloneSettings.glsl | ||
NegatedAtan.glsl | ||
NegatedAtanStandaloneSettings.glsl | ||
NegatedLdexp.glsl | ||
NegatedLdexpStandaloneSettings.glsl | ||
PowWithConstantExponent.glsl | ||
PowWithConstantExponentStandaloneSettings.glsl | ||
RewriteDoWhileLoops.glsl | ||
RewriteDoWhileLoopsStandaloneSettings.glsl | ||
RewriteMatrixComparisons.glsl | ||
RewriteMatrixComparisonsStandaloneSettings.glsl | ||
RewriteMatrixVectorMultiply.asm.frag | ||
RewriteMatrixVectorMultiply.glsl | ||
RewriteMatrixVectorMultiplyStandaloneSettings.glsl | ||
TernaryShortCircuit.glsl | ||
TernaryShortCircuitStandaloneSettings.glsl |