This was no longer referenced anywhere.
Change-Id: I479c70e528e48c8c1a8945230739ecf0a87c3f9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541746
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This was only used by DSL fragment processors and is unreferenced.
This removal causes the uniform-handle value in DSLVarBase to become
unreferenced as well.
Change-Id: Ifc89a3dda93f08c40341f654981bbb6593d4fb9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541745
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 4b354dfb5b.
Reason for revert: not responsible for chromium:1326848
Original change's description:
> Revert "Remove operator= from DSL expression types."
>
> This reverts commit b143520625.
>
> Reason for revert: might have caused chromium:1326848
>
> Original change's description:
> > Remove operator= from DSL expression types.
> >
> > This means that in raw DSL code, `foo = bar` will need to be written as
> > `foo.assign(bar)`. This is admittedly slightly less convenient. However,
> > in practice, raw DSL code is very rare, and in fact we only had one
> > use-case for operator= across all of our code. This change will allow us
> > to simplify the DSL parser by eliminating the `DSLWrapper` helper class,
> > which was only needed because we overloaded `operator=`.
> >
> > Change-Id: I4fbc39b2c1443fc26a761d424c52e3b9b59169eb
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541062
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> Change-Id: I7c7e032c465aba004ba78fd69650c8037e019861
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541737
> Auto-Submit: John Stiles <johnstiles@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Change-Id: I0814f87e360b5574d4a06764bbfa747c49820774
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542136
Commit-Queue: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This allows the user to override the waterfall with sliders for each of
the axes in the typeface.
Change-Id: Iddb8a7c97d69c65994a707f14c43d6b1dc3f3cd7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541743
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: skia:11209
Change-Id: I89d97bce1934a985c1efed602680dd534702a800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541072
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This setting was meant to detect errors in hand-authored DSL programs,
where a DSL expression or statement object was instantiated but wasn't
actually added to the program.
The DSL parser always disabled this flag. We don't plan on creating
large hand-crafted DSL programs going forward. Also, if you fail to add
an expression/statement to your program, your program will be missing
part of its code, which is already pretty self-evident as errors go.
Change-Id: I4c7b89d1f05cc65dc84948d98da8d6576c1be244
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541739
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Move allocation of Caps::fShaderCaps to the base class,
and add a finishInitialization method, like GrCaps.
Change-Id: I5353a03afea29390be3cce1fb371374532f5af3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541073
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This only existed for ES2 devices, which can now use the fixed-length
loop approach.
Change-Id: I8042c0baa89539cad47a4ee321eafa5fa0a33879
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541071
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
GLSL, Metal, and WGSL code generators now determine the sk_PointSize
builtin by modifier value instead of by name. Also updated GLSL code
generator to use SK_POSITION_BUILTIN when processing sk_Position.
Change-Id: I57418f66786dd2bac8c4a7d8c34f83221daf505c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541719
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
This splits out the functionality for tiling and colorizing. It passes
t-values around in a manner similar to ganesh in which we actually pass
around a float2 containing t as x and a valid flag (1 or -1) as y, and
if the t is invalid then the colorizer will discard the fragment.
Bug: skia:13302
Change-Id: I901c0f1f6a2c4ffff6b8e3c05d339843d6184086
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541420
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
The DSLVarBase `fDeclared` field was used to track whether a variable
was created with `Var`, but never declared with a matching `Declare`, in
a hand-authored DSL program. This was expected to be a common source of
slip-ups in hand-authored DSL, so we tracked it and printed a handy
error message if `Declare` was ever missing. However, this complicated
testing, because in tiny test snippets we _do_ want the ability to
create variables without necessarily declaring them. So, we had a
separate program setting to disable enforcement for test code.
For programs created in DSLParser, tracking this state is unnecessary;
the parser won't ever forget to declare variables.
Since hand-authored DSL programs are no longer expected to be
commonplace, we can remove the state tracking and the associated
ProgramSettings field entirely.
Change-Id: I32b28f8a2ca6591d3da80cd974fff8101f5a4be8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541638
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This feature is always disabled when DSLParser is used. Name mangling
was only useful when compiling hand-authored DSL code that explicitly
declared two variables with the same name in separate scopes. In
practice, as long as we aren't declaring complete programs in DSL form,
we don't need this.
Change-Id: Icad921eb86365b3b114ff1872b1c40c41470a4b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541637
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The end goal for the PaintCombo is that it is opaque to the user and
generated via a CombinationBuilder object.
Bug: skia:12701
Change-Id: I0ca6fb52207e85c444f2ddbcb43f7cf90bcafb34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540746
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Previously, our kernel and offset data was stored in two separate arrays
of half4. Now, they are interleaved into one array of half2. This allows
us to index into the data without complex control-flow or extra ALU ops
per sample. This change would allow us to use the "fixed-length loop"
path on ES2 hardware, assuming it's no slower.
Change-Id: I65c5b4c74475ca03f12d86f8896af2f95a059635
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541070
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
* Added support for field access expressions, excluding user-defined
interface blocks.
* Added a test case for vertex stage builtin declarations.
* Added a NOP workaround for sk_PointSize which does not have a
WGSL/WebGPU equivalent.
Bug: skia:13092
Change-Id: I46fd7bb0a9fe55d2e3ed2b3b72f63376c1ed4f31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539082
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
subprocess.check_output needs encoding or it defaults
to bytes.
Python 3 has / be float division and // be integer
division.
The skpbench fix is speculative.
Change-Id: I13d0e976c03bba30761c8ab533e6fdd041b795c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541696
Reviewed-by: Ravi Mistry <rmistry@google.com>
Based on the structure of the checks, there's no way to enter an if
block if the denominator of the division would be zero.
Change-Id: I252c05aab43f26984afa2eab89648d5ec4e280b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541074
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
This was removed from the DSLSymbols header when DSLParser first landed
(see http://go/skiareview/c/skia/+/400622/55/include/sksl/DSLSymbols.h)
but not removed from the cpp file. It appears to have been unused ever
since then.
Change-Id: Iaa948c62f7e8f5530c6a27f65e7f4e74919cf966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541636
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
We no longer support compiling in C++14, so we don't need these
workarounds anymore.
Change-Id: Idec5a90e98c242928182f4b32dd47459be8ca47f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541075
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
This reverts commit b143520625.
Reason for revert: might have caused chromium:1326848
Original change's description:
> Remove operator= from DSL expression types.
>
> This means that in raw DSL code, `foo = bar` will need to be written as
> `foo.assign(bar)`. This is admittedly slightly less convenient. However,
> in practice, raw DSL code is very rare, and in fact we only had one
> use-case for operator= across all of our code. This change will allow us
> to simplify the DSL parser by eliminating the `DSLWrapper` helper class,
> which was only needed because we overloaded `operator=`.
>
> Change-Id: I4fbc39b2c1443fc26a761d424c52e3b9b59169eb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541062
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I7c7e032c465aba004ba78fd69650c8037e019861
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541737
Auto-Submit: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This reverts commit 3b4f862d05.
Reason for revert: might have caused chromium:1326848
Original change's description:
> Remove DSLWrapper helper class.
>
> Without an `operator=` on our expressions and variables, we no longer
> need to wrap all our expressions with a helper.
>
> Change-Id: I8110079f61c9ad01997f7c4b376db223dc4b6e17
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541063
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I7efb3004913f7c85dc551d9740a6b31971de52d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541736
Auto-Submit: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
- Add support for simple assignment expressions, as well as swizzle,
variable references, and type conversion constructors to support
simple assignment test cases that reference built-ins and local variables.
- Handle a case where the type of a SkSL built-in differs from its WGSL
counterpart and emit a type cast when such a variable gets referenced.
- Add additional test cases for supported WGSL features that could not
be tested without simple assignment support.
Bug: skia:13092
Change-Id: Ib1ff3bcef60e436c9be5c08236c9fe4de02dd005
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538420
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
WGSL requires that pipeline stage IO parameters that are scalar or
vector integers be annotated with the "flat" interpolation attribute.
Bug: skia:13092
Change-Id: I2930da6cf468ac8cd9ccaca0004e5849065411dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538419
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is similar to https://skia-review.googlesource.com/c/buildbot/+/538218
BIG CHANGE: If we fail to download uninteresting hashes
(because Gold is down or the script otherwise fails), we
now crash/fail our Test-* tasks. In an early version of
this removal, that lack of failure masked an issue with
the script (urllib2 is not in Python3) and nearly would
have landed. Failing loudly is better, IMO.
This removes the symbolize_stack_trace script, which
stopped working with Python3 for reasons unknown.
If we need the behavior, we can rewrite it.
Relatedly, we removed 4 jobs, the Docker ones, because
we will not get much value out of them as we migrate
towards Bazel and removing the symbolization script
was tricky to get right.
There are a few cleanups around copypasta that I noticed
when combing through the recipes.
Change-Id: I8dfab416e964fd494267800b4ebe216061895f19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538636
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
The version in CIPD is 4.46, which has the following
issue when run in Python 3:
https://github.com/GoogleCloudPlatform/gsutil/issues/961
This asset uses the latest version, 5.10, which *only*
supports Python 3.
Our gsutil recipe module had some "Windows-specific"
behavior that was actually running on Linux and needed
to be changed because it was using Python2 to run
gsutil.
Change-Id: I6884b9b6fcc600351a8e608dc9e3c0114907a586
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541220
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This just adds the API. Additional work will be required to actually
create an SkShaderSnippet for the runtime effect.
The SkBlenderID will be used in the combination system to specify the
Blender runtime effect as a combination candidate.
Bug: skia:12701
Change-Id: I524a2fa7a00ece6d9422891bcbc82ce0237679e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540170
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
1. It is illegal to declare an empty struct in WGSL. The codegen no longer
declares an empty struct for pipeline stage inputs and outputs if the
program does not reference them.
2. WGSL requires that every vertex program declare a @builtin(position) output.
The codegen now emits this pipeline stage output even for an empty
program that doesn't assign to sk_Position. This allows unit tests for
vertex programs to be authored without unnecessary boilerplate.
Bug: skia:13092
Change-Id: Ib023200e2ba13acf96859817249686d7f815cb00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538418
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
- Introduced the SK_ENABLE_WGSL_VALIDATION macro which is currently only
enabled when skslc gets compiled when using the `skia_compile_sksl_tests`
setting.
- SkSLCompiler::toWGSL now validates its output using Tint's WGSL reader
structures based on conditionally compiled code depending on the
SK_ENABLE_WGSL_VALIDATION flag.
- Fixed `warning: use of deprecated language feature: struct members should be separated with commas"
warnings that were generated for HelloWorld.wgsl.
Bug: skia:13092
Change-Id: Ib894457030004966221faf82f61360e390b95e22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537802
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This adds aliases like skvx::float2, float4, etc. to SkVx.h and goes
through existing usages of SkVx to standardize on those aliases, or
refer to the full name directly.
In particular, this lets us clean up the equivalent aliases in
src/gpu/tessellate, src/gpu/graphite/VectorTypes and src/gpu/ganesh/GrVx
Where possible, I switched to using skvx::Foo directly and leveraged
auto to make it less redundant. Headers always used the full type
except for PatchWriter.h and Rect.h because of the number of their
usages. In this case, the alias is scoped to private so it can't leak.
This is prep to migrate older code that is still using SkNx and its
aliases like Sk4f to SkVx as well.
Change-Id: I9dd104e83cf17c2b88995a047cfd2e2b0fe6fac2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
ProgramSettings now has a fRequiredVersion, based on the #version
directive (if any). There is plenty more to do, and this is an
intermediate state where the "fEnforceES2Restrictions" bool still
exists. Eventually, that will go away, or change into a check between
the required version and the SkCapabilities supplied (also in
ProgramSettings).
As a proof-of-concept, this migrates some use-cases to insert the new
version directive, and unlock ES3 features in some tests and benches.
Bug: skia:11209
Change-Id: I964975931039588d7a302bfedd09246e3d4a79d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540037
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Id6e4d82d96f6393c70866bcc8430d4f088d2ad2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541066
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Remove the unneeded device information from the Painter. Flow
the device info where needed in the code.
Change-Id: I31f79979a0e8f4d41ea942ea9c7052fbe83cd330
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541059
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This eliminates duplicate code and gives a consistent API between the
three tessellation approaches, which will let the graphite
PatchAllocators be generalized into a template that takes a
FixedCountFoo.
Bug: skia:13056, skia:13012
Change-Id: I556822b43807c14c2e4e5c919f60cb766d43f6fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537456
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Consolidates some other constants, removes the pow2 and pow4 functions
that just computed `x*x` or `x*x*x*x`. Moves the `mix` function into
PatchWriter since that's the only place it's used.
Change-Id: Idaaba40f1007e1f0331ec8d335e6afbe69ddfbad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540920
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>