2016-10-26 18:17:04 +00:00
|
|
|
# Copyright 2016 Google Inc.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
# Things are easiest for everyone if these source paths are absolute.
|
|
|
|
_src = get_path_info("../src", "abspath")
|
|
|
|
|
|
|
|
skia_sksl_sources = [
|
2019-03-21 15:05:37 +00:00
|
|
|
"$_src/sksl/SkSLByteCodeGenerator.cpp",
|
2016-10-26 18:17:04 +00:00
|
|
|
"$_src/sksl/SkSLCFGGenerator.cpp",
|
|
|
|
"$_src/sksl/SkSLCompiler.cpp",
|
2017-09-11 16:33:48 +00:00
|
|
|
"$_src/sksl/SkSLCPPCodeGenerator.cpp",
|
2018-08-31 14:52:47 +00:00
|
|
|
"$_src/sksl/SkSLCPPUniformCTypes.cpp",
|
2017-09-11 16:33:48 +00:00
|
|
|
"$_src/sksl/SkSLGLSLCodeGenerator.cpp",
|
2017-09-11 20:50:14 +00:00
|
|
|
"$_src/sksl/SkSLHCodeGenerator.cpp",
|
2018-03-27 18:10:52 +00:00
|
|
|
"$_src/sksl/SkSLInterpreter.cpp",
|
2017-09-11 20:50:14 +00:00
|
|
|
"$_src/sksl/SkSLIRGenerator.cpp",
|
2018-03-27 18:10:52 +00:00
|
|
|
"$_src/sksl/SkSLJIT.cpp",
|
2017-09-11 20:50:14 +00:00
|
|
|
"$_src/sksl/SkSLLexer.cpp",
|
2017-10-13 20:17:45 +00:00
|
|
|
"$_src/sksl/SkSLMetalCodeGenerator.cpp",
|
2019-01-22 15:59:11 +00:00
|
|
|
"$_src/sksl/SkSLOutputStream.cpp",
|
2017-09-11 20:50:14 +00:00
|
|
|
"$_src/sksl/SkSLParser.cpp",
|
2018-07-31 13:44:36 +00:00
|
|
|
"$_src/sksl/SkSLPipelineStageCodeGenerator.cpp",
|
2016-10-26 18:17:04 +00:00
|
|
|
"$_src/sksl/SkSLSPIRVCodeGenerator.cpp",
|
2017-03-31 17:56:23 +00:00
|
|
|
"$_src/sksl/SkSLString.cpp",
|
2016-10-26 18:17:04 +00:00
|
|
|
"$_src/sksl/SkSLUtil.cpp",
|
|
|
|
"$_src/sksl/ir/SkSLSymbolTable.cpp",
|
2017-06-29 14:03:38 +00:00
|
|
|
"$_src/sksl/ir/SkSLSetting.cpp",
|
2016-10-26 18:17:04 +00:00
|
|
|
"$_src/sksl/ir/SkSLType.cpp",
|
2018-03-26 18:24:27 +00:00
|
|
|
"$_src/sksl/ir/SkSLVariableReference.cpp",
|
2016-10-26 18:17:04 +00:00
|
|
|
]
|
2017-06-29 14:03:38 +00:00
|
|
|
|
2017-07-05 20:19:09 +00:00
|
|
|
skia_gpu_processor_sources = [
|
2018-10-15 20:09:54 +00:00
|
|
|
"$_src/gpu/effects/GrAARectEffect.fp",
|
2018-04-06 14:37:55 +00:00
|
|
|
"$_src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp",
|
2017-07-14 20:17:04 +00:00
|
|
|
"$_src/gpu/effects/GrBlurredEdgeFragmentProcessor.fp",
|
2018-03-12 18:03:47 +00:00
|
|
|
"$_src/gpu/effects/GrCircleBlurFragmentProcessor.fp",
|
2017-07-13 20:00:16 +00:00
|
|
|
"$_src/gpu/effects/GrCircleEffect.fp",
|
2019-04-09 20:28:19 +00:00
|
|
|
"$_src/gpu/effects/GrComposeLerpEffect.fp",
|
|
|
|
"$_src/gpu/effects/GrComposeLerpRedEffect.fp",
|
2017-10-05 16:36:59 +00:00
|
|
|
"$_src/gpu/effects/GrConfigConversionEffect.fp",
|
2017-11-20 17:12:24 +00:00
|
|
|
"$_src/gpu/effects/GrConstColorProcessor.fp",
|
2017-07-14 17:11:38 +00:00
|
|
|
"$_src/gpu/effects/GrEllipseEffect.fp",
|
2017-11-07 14:23:38 +00:00
|
|
|
"$_src/gpu/effects/GrLumaColorFilterEffect.fp",
|
2017-12-13 19:36:14 +00:00
|
|
|
"$_src/gpu/effects/GrMagnifierEffect.fp",
|
2019-03-05 15:03:20 +00:00
|
|
|
"$_src/gpu/effects/GrMixerEffect.fp",
|
2017-11-17 18:44:05 +00:00
|
|
|
"$_src/gpu/effects/GrPremulInputFragmentProcessor.fp",
|
2017-10-16 16:35:44 +00:00
|
|
|
"$_src/gpu/effects/GrRectBlurEffect.fp",
|
2017-12-20 17:00:11 +00:00
|
|
|
"$_src/gpu/effects/GrRRectBlurEffect.fp",
|
2017-07-13 13:36:52 +00:00
|
|
|
"$_src/gpu/effects/GrSimpleTextureEffect.fp",
|
2018-09-12 19:23:33 +00:00
|
|
|
"$_src/gpu/gradients/GrDualIntervalGradientColorizer.fp",
|
Reland "Base Gradient FP Refactor"
This reverts commit 1ea5656a285bcfef445d6f69eaab477e68595b54.
Reason for revert: Fixed google3 build failure
Original change's description:
> Revert "Base Gradient FP Refactor"
>
> This reverts commit 10f7a1e07554a362aef979d32ba288a009bdff90.
>
> Reason for revert: broke google3 roll
> Original change's description:
> > Base Gradient FP Refactor
> >
> > --
> >
> > Redefines how gradients will be written in the GPU back-end:
> >
> > They are split into three fragment processor components: master, layout, and colorizer.
> > The layout FP is responsible for converting the fragment position into an interpolant value, t.
> > Each high-level gradient--such as linear, radial, etc.--are implemented solely in a layout FP.
> > The colorizer FP is responsible for converting t into a color.
> > The master FP invokes the layout, clamps t into the proper domain, and then invokes the colorizer.
> > GrGradientShader provides factory functions to create FP graphs from SkGradientShader instances.
> > This pattern is documented in gpu/gradients/README.md.
> >
> > Goals for current CL
> > ====================
> >
> > Outline the FP components by providing .fp implementations for the simplest gradients.
> > Defines a two-color single interval colorizer and a linear gradient layout, and the master effect.
> > A MakeLinear() factory function is provided that can convert SkGradientShaders that fit these constraints.
> > SkLinearGradient first attempts to use the new system, falling back to the original GrGradientEffect.
> >
> > Future CLs
> > ==========
> >
> > To keep the CL reviews manageable, additional dependent CLs will be added that gradually replace past functionality.
> > A CL for each layout will be defined.
> > CLs for the different analytic colorizer cases and the textured gradient case will be defined.
> > Once the new system supports all current layouts and colorizer capabilities, all old GPU gradient code will be removed.
> > After this clean-up, analytic colorization can hopefully be expanded to reduce the usage of textured gradients.
> >
> > Bug: skia:
> > Change-Id: Iafe7b8b4071491a71c473babcd7bedda659150c1
> > Reviewed-on: https://skia-review.googlesource.com/148120
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,michaelludwig@google.com
>
> Change-Id: Ib735e323795ac8874cb00b007a915786b50517a6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/153600
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>
TBR=bsalomon@google.com,caryclark@google.com,michaelludwig@google.com
Change-Id: Ibf6ffbcb1af0dfbdac7317151aeb08f18f84c7fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/153887
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2018-09-12 19:22:16 +00:00
|
|
|
"$_src/gpu/gradients/GrSingleIntervalGradientColorizer.fp",
|
2018-09-14 13:47:21 +00:00
|
|
|
"$_src/gpu/gradients/GrTextureGradientColorizer.fp",
|
Reland "Reland "Implement an explicit binary search-based analytic gradient colorizer""
This is a reland of f065907ccc0ae5e9258443b5a1bbabeef181e965
3rd time's the charm:
The new analytic gradient shader was sporadically triggering violations of the coverage as alpha
compatibility optimization. Unfortunately, even when using the same device and random seed for the
test, the bots did not always reproduce the error. However, we identified the likely cause of the
violation.
The test requires that all output channels are less than the input alpha, which it uses to validate
whether or not the shader is modulating its values by the input alpha. This test does not pass if
the RGB values are greater than 1. The original version of the analytic gradient shader used half4s
for its scale and bias values. Given the threshold limit for hardstops of 0.00024 (SkNearlyZero),
a very small interval that is not treated as a hardstop can create a scale or bias of over 4000.
This moves into the very imprecise region of 16-bit floats, making it plausible that the gradient
outputs colors greater than 1, due to rounding. The kicker is that the random test generation for
stop locations does not use a uniform distribution, but is instead biased towards the remaining
interval, which increases the likelihood of generating a small interval that is not treated as a
hard stop. We are keeping this behavior since ill-conditioned gradients are useful in testing.
Original change's description:
> Reland "Implement an explicit binary search-based analytic gradient colorizer"
>
> This reverts commit 9461dcf1306a9a9517e1545cf6d16bde05261280.
>
> Reason for revert: Fixes for ANGLE's incorrect shader behavior
>
> Original change's description:
> > Revert "Implement an explicit binary search-based analytic gradient colorizer"
> >
> > This reverts commit dcc85fc61008f61daef4313846bdd62877fd596d.
> >
> > Reason for revert: ANGLE is frequently corrupted, particularly radial_gradient4 and mixershader
> >
> > Original change's description:
> > > Implement an explicit binary search-based analytic gradient colorizer
> > >
> > > Provides a reasonably flexible fragment processor that defines another
> > > colorizer implementation for gradients. It can support up to 8
> > > interpolation intervals (which is 16 colors if every stop is a hard stop
> > > or 9 colors if every stop is a smooth transition). It
> > > supports mixtures of hard and smooth stops. It is conditionally compiled
> > > into versions specific to the interval count (so it can produce up to
> > > 8 shader variants).
> > >
> > > The GrGradientShader controller does not remove the single and dual
> > > interval colorizers, which are useful specializations of this explicit
> > > binary search colorizer. Similarly, since it can only handle up to 8
> > > intervals, the texture colorizer is still used as a fallback.
> > >
> > > Currently it does not employ capabilities detection to determine if the
> > > hardware can support the number of required uniforms, which can become
> > > substantial for the larger gradient configurations.
> > >
> > > Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> > > Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b
> > > Reviewed-on: https://skia-review.googlesource.com/155080
> > > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> >
> > TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com
> >
> > Change-Id: I351a387f0528e4c2db2d47ab2e5d6b336991fb98
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> > Reviewed-on: https://skia-review.googlesource.com/156541
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com
>
> Change-Id: I2aca36307d88c26905d860ec29417ec68c6037cc
> Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> Reviewed-on: https://skia-review.googlesource.com/156542
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
Change-Id: I2d050624781c77cdd160291cadbadac602b48bde
Reviewed-on: https://skia-review.googlesource.com/c/157569
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-28 15:53:32 +00:00
|
|
|
"$_src/gpu/gradients/GrUnrolledBinaryGradientColorizer.fp",
|
Reland "Base Gradient FP Refactor"
This reverts commit 1ea5656a285bcfef445d6f69eaab477e68595b54.
Reason for revert: Fixed google3 build failure
Original change's description:
> Revert "Base Gradient FP Refactor"
>
> This reverts commit 10f7a1e07554a362aef979d32ba288a009bdff90.
>
> Reason for revert: broke google3 roll
> Original change's description:
> > Base Gradient FP Refactor
> >
> > --
> >
> > Redefines how gradients will be written in the GPU back-end:
> >
> > They are split into three fragment processor components: master, layout, and colorizer.
> > The layout FP is responsible for converting the fragment position into an interpolant value, t.
> > Each high-level gradient--such as linear, radial, etc.--are implemented solely in a layout FP.
> > The colorizer FP is responsible for converting t into a color.
> > The master FP invokes the layout, clamps t into the proper domain, and then invokes the colorizer.
> > GrGradientShader provides factory functions to create FP graphs from SkGradientShader instances.
> > This pattern is documented in gpu/gradients/README.md.
> >
> > Goals for current CL
> > ====================
> >
> > Outline the FP components by providing .fp implementations for the simplest gradients.
> > Defines a two-color single interval colorizer and a linear gradient layout, and the master effect.
> > A MakeLinear() factory function is provided that can convert SkGradientShaders that fit these constraints.
> > SkLinearGradient first attempts to use the new system, falling back to the original GrGradientEffect.
> >
> > Future CLs
> > ==========
> >
> > To keep the CL reviews manageable, additional dependent CLs will be added that gradually replace past functionality.
> > A CL for each layout will be defined.
> > CLs for the different analytic colorizer cases and the textured gradient case will be defined.
> > Once the new system supports all current layouts and colorizer capabilities, all old GPU gradient code will be removed.
> > After this clean-up, analytic colorization can hopefully be expanded to reduce the usage of textured gradients.
> >
> > Bug: skia:
> > Change-Id: Iafe7b8b4071491a71c473babcd7bedda659150c1
> > Reviewed-on: https://skia-review.googlesource.com/148120
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,michaelludwig@google.com
>
> Change-Id: Ib735e323795ac8874cb00b007a915786b50517a6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/153600
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>
TBR=bsalomon@google.com,caryclark@google.com,michaelludwig@google.com
Change-Id: Ibf6ffbcb1af0dfbdac7317151aeb08f18f84c7fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/153887
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2018-09-12 19:22:16 +00:00
|
|
|
"$_src/gpu/gradients/GrLinearGradientLayout.fp",
|
2018-09-12 19:22:37 +00:00
|
|
|
"$_src/gpu/gradients/GrRadialGradientLayout.fp",
|
2018-09-12 19:22:50 +00:00
|
|
|
"$_src/gpu/gradients/GrSweepGradientLayout.fp",
|
2018-09-12 19:23:01 +00:00
|
|
|
"$_src/gpu/gradients/GrTwoPointConicalGradientLayout.fp",
|
Reland "Base Gradient FP Refactor"
This reverts commit 1ea5656a285bcfef445d6f69eaab477e68595b54.
Reason for revert: Fixed google3 build failure
Original change's description:
> Revert "Base Gradient FP Refactor"
>
> This reverts commit 10f7a1e07554a362aef979d32ba288a009bdff90.
>
> Reason for revert: broke google3 roll
> Original change's description:
> > Base Gradient FP Refactor
> >
> > --
> >
> > Redefines how gradients will be written in the GPU back-end:
> >
> > They are split into three fragment processor components: master, layout, and colorizer.
> > The layout FP is responsible for converting the fragment position into an interpolant value, t.
> > Each high-level gradient--such as linear, radial, etc.--are implemented solely in a layout FP.
> > The colorizer FP is responsible for converting t into a color.
> > The master FP invokes the layout, clamps t into the proper domain, and then invokes the colorizer.
> > GrGradientShader provides factory functions to create FP graphs from SkGradientShader instances.
> > This pattern is documented in gpu/gradients/README.md.
> >
> > Goals for current CL
> > ====================
> >
> > Outline the FP components by providing .fp implementations for the simplest gradients.
> > Defines a two-color single interval colorizer and a linear gradient layout, and the master effect.
> > A MakeLinear() factory function is provided that can convert SkGradientShaders that fit these constraints.
> > SkLinearGradient first attempts to use the new system, falling back to the original GrGradientEffect.
> >
> > Future CLs
> > ==========
> >
> > To keep the CL reviews manageable, additional dependent CLs will be added that gradually replace past functionality.
> > A CL for each layout will be defined.
> > CLs for the different analytic colorizer cases and the textured gradient case will be defined.
> > Once the new system supports all current layouts and colorizer capabilities, all old GPU gradient code will be removed.
> > After this clean-up, analytic colorization can hopefully be expanded to reduce the usage of textured gradients.
> >
> > Bug: skia:
> > Change-Id: Iafe7b8b4071491a71c473babcd7bedda659150c1
> > Reviewed-on: https://skia-review.googlesource.com/148120
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,michaelludwig@google.com
>
> Change-Id: Ib735e323795ac8874cb00b007a915786b50517a6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/153600
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>
TBR=bsalomon@google.com,caryclark@google.com,michaelludwig@google.com
Change-Id: Ibf6ffbcb1af0dfbdac7317151aeb08f18f84c7fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/153887
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2018-09-12 19:22:16 +00:00
|
|
|
"$_src/gpu/gradients/GrClampedGradientEffect.fp",
|
|
|
|
"$_src/gpu/gradients/GrTiledGradientEffect.fp",
|
2017-07-05 20:19:09 +00:00
|
|
|
]
|