Adds counters for the number of render passes, number of MSAA render
passes, and each op that either does or would trigger MSAA. Adds a
bot that collects stats on the html (not svg) skps.
Bug: skia:11396
Change-Id: Ic48263d6310670d8f0d09ec4c4bf6a2b83fc7d02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401636
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This adds an explicit DeclareGlobal call, which must now be called for
variables that were previously implicitly global.
Change-Id: Iaf838880d1033ee52aac9246e31e3bda9a3b36f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402399
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Previously, "x = 1.0" (as opposed to 1.0f) would fail with an ambiguous
operator resolution.
Change-Id: I9bcb4115d209a2aadb3fc4c237b61c345b25ca00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400619
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
All internal usage has migrated to MakeFor..., this removes the old
program kind, and updates some tests.
Bug: skia:11813
Change-Id: I56733b071270e1ae3fab5d851e23acf6c02e3361
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402536
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Simplifies SampleUsage quite a bit (no need to track multiple kinds of
sampling, variable matrices don't exist any more, etc...).
Change-Id: I58b8de7218d00c4d882d2650672e5fe01892a062
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402177
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This CL adds a RuntimeEffect option flag which skips over the various
`strictES2Mode` checks sprinkled throughout IR generation.
Runtime Effects still won't allow a lot of ES3 things (the Pipeline
stage will reject unsupported statement types, SkVM doesn't support most
non-ES2 constructs, etc). However, this change will give us the ability
to test many more features involving arrays and structs that previously
were off-limits due to ES2 restrictions, and will shore up some
legitimate gaps in our testing. This is a useful starting point to allow
for improved test coverage.
Change-Id: I4a5bc43914e65fc7e59f1cecb76a0ec5a7f05f2f
Bug: skia:11209
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402157
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
and remove SkRuntimeEffectInvalidColorFilters.
Change-Id: I80753e635fb0b2e93637a8b2a7f2add66020e4c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402196
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is completely unused - GrMatrixEffect is the only thing that deals
with matrix transforms on child sampling. Removing this makes everything
simpler to reason about.
Change-Id: I555a3fd937c064f2480b149a6d4d8e36f7ee69bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402176
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
All clients have been moved to the stage-specific factories. The old
flexible factories are still used internally (for now), but this
prevents any new usage from creeping in accidentally.
Bug: skia:11813
Change-Id: I6c34dfd19b396541f9a0e2f9eab8a51591ed8b70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402156
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Only supports finding / matching, never Making
Change-Id: I81b09e7f3563cab4ed4f0fbfc598781ff3a355aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401576
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
This relands the idea that onMatchFaceStyle is no longer used, but
leaves the baseclass virtual to stage removing it from client
subclasses.
This reverts commit 3c04a65508.
Change-Id: I18570065249c86f7f155c28288dce3ea9d59f619
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401759
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Change-Id: I00cc1e89fd85fdc0ce0860fcb35ececd0eaec50a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400540
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This gives DSLVar the ability to be set up after initial construction.
To do this, we create a plain empty Var, then swap it with the actual
Var we want afterwards. This allows DSL to support Vars which are
`uniform half4` in some cases and `const half4` (or entirely unused) in
other cases.
This technique was adapted from similar code in Ethan's parser CL.
Change-Id: Ic54d037a0102fda77b25d4755caf77a291eaa8c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400716
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
They're only used for the legacy implementation of sk_float_rsqrt,
which is going away.
SkFloatingPoint.h is part of ca 10,000 translation units when building
Chrome, and include graph analysis shows that including xmmintrin.h
adds a total of 3.5 GB to the build.
Avoiding these includes shaves ca 7 CPU-minutes off a local Chrome
build.
Bug: skia:11861 chromium:242216
Change-Id: Ib0fd53c4fb3ae254814fb6ae5afbb298efb0eb83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400437
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
The instructions used to implement it don't deliever
the same results across processors, even on the same
architecture.
Minor diffs on lighting image filter GMs;
this will likely require staged rollout.
Bug: skia:11861
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: I4c0b0eab221a051f863f4949051f50652466651e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396723
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Mixed samples is no longer relevant for Ganesh. DMSAA and the new
Ganesh architecture both rely on full MSAA, and any platform where
mixed samples is supported will ultimately not use the old
architecture.
Change-Id: I5acc745010e090ef26310d92ec6240be2cd494cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399837
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Add a drawGlyphs to SkCanvas that takes SkRSXform instead of
positions. Update buffer sizing calculations to take
SkRSXform buffers into account.
Change-Id: I14529088199dcd0b1ae78b4605e1ba77fec2000e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399096
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This code appears to be clearing out the SkSurfaceProps in order to
disable LCD text. We ought to be able to only disable the LCD text,
while preserving the SkSurfaceProps flags.
Bug: skia:11396
Change-Id: I7c1f49f59639404535a445f0318ab97b07c20c84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397636
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is another strange, experimental feature that clutters the
implementation and isn't used by anyone (to my knowledge).
Change-Id: I538b7eca0cd28aab32f4739b23459731ade9105e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398226
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
In D3D we can alias a resource's allocation and re-use it for
another resource. For example, this is used in the mipmap generator
when we have an sRGB texture. The sRGB formats can't be used in a
UAV, but we can use an aliased texture with the corresponding linear
format, and do the sRGB conversion in the compute shader.
Change-Id: I6995cdecf5be36aafbed5c48e639c09f41ec4f8b
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397996
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This was an experimental feature. It worked (but only the GPU backend).
It was never adopted or used by anyone, to my knowledge. It's a large
amount of code, and a strange corner of SkSL for users to stumble into.
Bug: skia:10680
Change-Id: I0dda0364bce7dbffa58c32de4c7801ec2a6bc42e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398222
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
A Block() at the top-level scope would previously disappear silently.
Change-Id: Ic3bac058361658d2e5bd8de1e3718dedf4cef1f7
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397516
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This also connects a lot of the wires needed to use dynamic MSAA in
vulkan. By using the framebuffer object in the render pass we can figure
out the specific framebuffer we want in one place, GrVkGpu::onGetOpsRenderPass,
and then the render pass itself doesn't need any explicit knowledge of
dmsaa stuff.
Bug: skia:11809
Change-Id: I3e4e71fa6f9536fdaf915d5369a2f8a24bf48c9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397156
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Also, disable quick-reject for now until bounds are fixed.
Change-Id: I08b9fa037d279a99fc393364a71cb171e3d16d4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397458
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
With this change, there is no need to produce a SkTextBlob when
using the drawGlyph, drawSimpleText, or drawString apis. These
calls just produce a light weight wrapper sending the wrapper
to onDrawGlyphRunList for rendering.
For recording, recording canvas converts the SkGlyphRunList into
a blob, and calls SkRecorder::onDrawTextBlob.
Remove unused call: drawPosTextCommon.
Change-Id: I173ba2793f74b521b33a6fb3dbd8d98945216a3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388719
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
These enforce stricter rules about the signature of main, and each one
uses a separate pre-include module. That prevents color filters from
being able to reference sk_FragCoord (or coords passed to main) at all.
It also limits the versions of sample() that are exposed.
In the new world, an effect created for a specific stage of the Skia
pipeline can only be used to create instances of that stage (SkShader or
SkColorFilter). For now, SkRuntimeEffect::Make uses kRuntimeEffect,
which continues to be more lenient and allow creation of either shaders
or color filters from a single effect. After we migrate all clients, we
can deprecate and then delete that mode.
Bug: skia:11813
Change-Id: I0afd79a72beeec84da42c86146e8fcd8d0e4c09f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395716
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The instructions used to implement it don't deliever
the same results across processors, even on the same
architecture.
Bug: skia:11861
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: I7831640fa6c0f01540619fce3f509c8969aaaaff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396722
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
The instructions used to implement it don't deliever
the same results across processors, even on the same
architecture.
Bug: skia:11861
Change-Id: Ifb87fc04a4ec866f84d7c2f2472c7f4b65661d28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396721
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This lets us test out the memory-fallback code in the new
ops task reordering pathway on our bots.
Bug: skia:10877
Change-Id: Ic5662ef68e46b144eb2821687390c858d0056ba1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396157
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
This reuses the work we're already doing to compute the one-at-a-time
program, and lets us share the result across color filter instances
created from the same effect.
When we added caching of the flag to filter creation, pinpoint found a
performance regression. I expect this to resolve that.
Bug: chromium:1187432
Change-Id: Ie4f8551fa432d298ce950cba8642b9de28f19b81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396758
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: Iee1ea7ee2d545138a8243c373f7a163f7120548d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396337
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
A subset of these signatures will be available to public SkSL, and
structured in a way that really pushes the coords as the primary
argument (and color as an optional one). In any case, I find this
ordering more natural.
Change-Id: I7b3bc962c5b305b9eeed1ae11ae1dc2ce7269364
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396021
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is a reland of 45889d1269
Original change's description:
> Remove code to push pixmaps to backend textures from GrGpu classes
>
> Replace GrGpu::updateBackendTexture with narrower method that clears
> a backend texture.
>
> Creation of data for a solid color compressed texture is lifted up to
> GrDirectContext and goes through updateCompressedBackendTexture.
>
> Bug: skia:11786
> Change-Id: I1d617623df5e65686f30e57c361a64f78d77f7bd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392836
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:11786
Change-Id: Ibf85794a33e68acb17f0fb704f6815cd6460b3f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396098
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 45889d1269.
Reason for revert: compressed texture assertion on D3D bot
Original change's description:
> Remove code to push pixmaps to backend textures from GrGpu classes
>
> Replace GrGpu::updateBackendTexture with narrower method that clears
> a backend texture.
>
> Creation of data for a solid color compressed texture is lifted up to
> GrDirectContext and goes through updateCompressedBackendTexture.
>
> Bug: skia:11786
> Change-Id: I1d617623df5e65686f30e57c361a64f78d77f7bd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392836
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
Change-Id: Ie58f52245c44c77f09742b0cb590cc97b97e6e37
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11786
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396097
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Replace GrGpu::updateBackendTexture with narrower method that clears
a backend texture.
Creation of data for a solid color compressed texture is lifted up to
GrDirectContext and goes through updateCompressedBackendTexture.
Bug: skia:11786
Change-Id: I1d617623df5e65686f30e57c361a64f78d77f7bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392836
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Currently doesn't do anything other than add new configs that set
a GrContextOption that becomes available in GrCaps. Runs new configs
on Perf/Test bots (MTL/iPhone11 and GL/Ubuntu).
Bug: skia:11844
Change-Id: I58586cae0980e52701abd1633dbc79b381f6015b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394996
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
DSLVar is normally implicitly converted to DSLExpression wherever it is
used, but the naively template-ized nature of DSLFunction::operator()
meant that it was accepting DSLVar parameters directly. Since DSLVar is
non-copyable, this meant DSLVar couldn't be passed directly to a DSL
function.
The smarter templates in this change are able to pass DSLVar by
reference.
Change-Id: Id04531f909cefd29b377c46e37fc4525bb29953c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394161
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
No functionality changes, just making the naming consistent with our
other enums.
Change-Id: Ic9bc4a89f8373e4dc1060067a41468fb626e5fa1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394160
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>