This only affects fragmentProcessors (children) - and the backend SkSL
we're emitting should not contain those. We've just been silently
ignoring those declarations when converting to GLSL, MSL, etc.
Change-Id: I241f2f4fe4614b49ebccc9c2976fd408e94656d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384316
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Expose text and cluster information in SkTextBlob::Iter when
SK_UNTIL_CRBUG_1187654_IS_FIXED is defined. The names are postfixed
with _forTest to indicate that these values are only being exposed for
testing purposes. This will allow blink tests to better verify the
output SkTextBlobs from the ShapeResultBloberizer. The long term goal
is to only store these results when necessary in a blink side type.
Bug: chromium:1187654,chromium:738643
Change-Id: I8db20a8423e5b0652429ddc16cf8fd14940217cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384336
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Takes the stored shaders and pipeline descriptor data stored in the
persistent cache, and generates the appropriate pipeline state. This
is then stored in the pipeline cache rather than the two libraries.
Bug: skia:11392
Change-Id: I2d97dba033a844b70290a411f6bd8891de34e6f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384216
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This makes the function comment "... composes `f` and `g` into f(g(x))"
true. The alternative would be to just fix the comment (and maybe rename
the arguments), but I find this order of arguments less surprising for
something doing function composition.
Change-Id: I38e2ea81402d829c0850713cc060fe16cb19ae28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384319
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Rounding out to pixel grid boundaries makes this method dmsaa-ready by
ensuring no pixels have partial msaa sample coverage.
Bug: skia:11396
Change-Id: I2543c8806f94692992a692bd5adedf41326c8910
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383416
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This will allow us to measure the impact (positive or negative) of
inlining functions before submitting a shader to the driver.
Change-Id: Icbd64096445a353187b30feea68573d89ca18664
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is a reland of 43e73df990
Original change's description:
> Remove GrAAType from GrFillRRectOp
>
> Replaces it with GrAA. This op always uses analytic coverage,
> regardless of MSAA state.
>
> Bug: skia:11396
> Change-Id: I75174a00bdb3b1f62319de5970aac7f1bbae8e10
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383418
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:11396
Change-Id: I2589a8f81a43f05329b91b6a136bebf723a5dd03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384298
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit a04692f69e.
Reason for revert: Angry Vulkan bots.
Original change's description:
> Fixed a number of spots where we should have been using RelaxedPrecision
>
> Our SPIR-V output was missing many RelaxedPrecision decorations, which
> was presumably impacting performance.
>
> Change-Id: Iee32d4a42f37af167fe0e45f3db94c2142129695
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384178
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
TBR=egdaniel@google.com,brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: If4fe945cb363c9b61b5a4abfde649a437689d2eb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384217
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
I ran into an issue in an upcoming CL which generated a particularly
ugly switch statement:
switch (x) {
default:
discard;}
So I cleaned this up, and while resolving this issue, managed to improve
a bunch of existing codegen as well. The formatting change has been
split out to a separate CL since it impacts so many golden outputs.
Change-Id: I7a6be29903c47560dcc7f6acd3ef15fd0c5c3c50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384179
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Our SPIR-V output was missing many RelaxedPrecision decorations, which
was presumably impacting performance.
Change-Id: Iee32d4a42f37af167fe0e45f3db94c2142129695
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384178
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
The non-virtual filterColor4f handles premul and unpremul at the API
boundary. onFilterColor4f always works on premul colors.
To get the performance benefits, all color filters in a chain need
to override the virtual. For now, WorkingFormatColorFilter is the
other target, as builtin filters that use runtime effects are always
wrapped with that.
Net effect on matrix_filterColor4f timing:
before: 10000 ns
after : 380 ns
Bug: skia:11730
Change-Id: I43d06f22c082636c4eca9e58dc3bc8225d09c910
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383705
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Instead, we just push the inner rrect to the clip stack and draw the
outer. It's faster to use GrFillRRectOp for the outer rect anyway, and
now that we use analytic clipping even when MSAA is enabled, there is
no added value in a specialized drawDRRect implementation.
Bug: skia:7826
Bug: skia:11396
Change-Id: I07b3143f2a5f9c75c7dfeda54e777b105bde9992
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383396
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This converts ccpr to just a poorly named atlas manager. The atlas
gets rendered by normal calls on its MSAA draw context:
for (;;) {
surfaceDrawContext->stencilPath(); // Stencil.
}
surfaceDrawContext->stencilRect(atlasBounds); // Cover.
Bug: chromium:1158093
Change-Id: I758ffd372b2ed5bb8b370156b6f80f6204146700
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381618
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
These seem to be remnants of the old inliner.
Change-Id: I881127d056531a2a23e045ff8f3d8da52314fc6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384176
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
All that's left is a clip atlas renderer.
Bug: chromium:1158093
Change-Id: I8b509904a752a202ff1321e5302c41a3f57a5edb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383741
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
It is undefined for the inner rrect to not be contained in the inner.
Change-Id: I632060771fb7918050e1836d17b4702ea765a08f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384116
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: dawn:706
Change-Id: I2a85a5a457f9a4c60b8cc337b0330aa348bd62a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384137
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
These are the simple cases like `break` and `continue` which don't have
any optimization opportunities, types to coerce, or errors to report.
We now have Make functions for consistency across our IRNodes, but they
don't contain any interesting logic.
Change-Id: Iefdb8e3dad66f131dc892f4a7dc647246bf2554e
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383707
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is mostly for consistency with other IRNode types; there isn't any
optimization opportunity or error checking for literals.
Change-Id: I0e6a55cddbd814585ecafeddab4e591fe5113911
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383996
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
44b9579cf7..225e1952d4
2021-03-12 cnorthrop@google.com Tests: Add Plants vs. Zombies 2 trace
2021-03-12 jdarpinian@chromium.org Revert "Update DEP actions for Python 3"
2021-03-11 cnorthrop@google.com Tests: Add Lineage M trace
2021-03-11 syoussefi@chromium.org Vulkan: Don't let glslang link shaders
2021-03-11 cnorthrop@google.com Capture/Replay: Support DrawElementsBaseVertex
2021-03-11 ianelliott@google.com Suppress flaky MultithreadingTest on Win/Swangle
2021-03-11 ynovikov@chromium.org Skip dEQP tests flakily timing out on SwANGLE
2021-03-11 jplate@google.com Fix CL_EVENT macro
2021-03-11 lexa.knyazev@gmail.com Avoid undefined behavior in BPTCCompressedTextureTest
2021-03-11 jplate@google.com Avoid implication that adding the issue number is optional
2021-03-11 lexa.knyazev@gmail.com Do not expose emulated ETC1 textures to WebGL
2021-03-11 lexa.knyazev@gmail.com Remove unused code from ValidateES2CopyTexImageParameters
2021-03-11 ianelliott@google.com Vulkan: Disable rotating damage rectangles on Android
2021-03-11 lubosz.sarnecki@collabora.com capture_replay_tests: Don't shadow subprocess import.
2021-03-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 023914a27b63 to a2fe8e1b2111 (1 revision)
2021-03-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 6691fcec0bce to a4e10bfde719 (24 revisions)
2021-03-11 lubosz.sarnecki@collabora.com frame_capture_utils: Do not serialize 0 bindings.
2021-03-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 075d29b4983b to 9e42f9e4abc6 (425 revisions)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC kjlubick@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: kjlubick@google.com
Test: Test: Black Desert MobileTest: Test: Extreme Car Driving SimulatorTest: Test: Genshin Impact MECTest: Test: Grand Theft Auto: San AndreasTest: Test: angle_perftests --gtest_filter="*lineage_m*"Test: Test: angle_perftests --gtest_filter="*plants_vs_zombies_2*"
Change-Id: Icc177809050bdb27b9de3ce6887cd8f0372bd90b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383978
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bug: skia:11738
Change-Id: I1dd5e99830f70d72c292379a45c4e39a55588858
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383706
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This slows down filter creation (300 ns -> 6000 ns),
... but speeds up the matrix_filterColor4f benchmark:
before: 22000 ns
after : 10000 ns
Bug: skia:11730
Change-Id: I5831688cbe0b6fbd8521fa5adab02ef0750b6190
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383704
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This will allow a subclass to rewrite a Statement or Expression when
visiting it.
Change-Id: Ia8b3121dd0558f2fbbd035d38f7caec9414fe8c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382756
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I30e4b37a43d1301d9e8011c9952874f3ba8d4f8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383702
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Replaces it with GrAA. This op always uses analytic coverage,
regardless of MSAA state.
Bug: skia:11396
Change-Id: I75174a00bdb3b1f62319de5970aac7f1bbae8e10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383418
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:11730
Change-Id: Icbb1f6acf31e3f130cb48338a1c44ca14f40e587
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383697
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This is conceptually the same thing, but we have various places in the
code which expect a unique_ptr<Statement>, and they don't allow a
unique_ptr<SwitchCase> to be passed in, since the types don't match.
This change is particularly relevant to the ProgramWriter, which will be
updated in a followup CL to pass the unique_ptr to visit methods.
Change-Id: I012669fa429a13658ac2be31342c92750fe84b92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382723
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Dead-function-removal and dead-global-removal was implemented directly
inside of Compiler::optimize(). This code has been broken out into
separate helper functions for clarity.
Additionally, dead-function elimination was guarded by a ProgramSetting,
but dead-variable elimination was only guarded by fOptimize. A new flag
for dead-variable elimination was added for consistency.
Change-Id: I783501362762dad08262ffb92602d02ec079ed9b
Bug: skia:11319
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382917
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Confirmed that this fixes the linked fuzzer bug.
I opted to leave the the backend implementations of
onGetDefaultBackendFormat unchanged, since they technically check
for unknown backend-specific formats before returning an invalid
GrBackendFormat object. It just so happens that this mapping always
ensures GrColorType::kUnknown has an unknown backend-specific format.
Presumably there are other known GrColorTypes that may be unknown
for a specific backend, so those low-level checks are still needed.
Now, we just check the GrColorType in GrCaps before calling the
virtual. This avoids trying to create an invalid format for
GrMockCaps and allows GrBitmapTextureMaker to convert unsupported
color types ot rgba8 even with the mock backend.
Bug: chromium:1185960
Change-Id: I043eb6730efe30884b4180768229b94d35d32047
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383036
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
We are seeing a crash in a flutter desktop linux application with the
the issue pointing to a sized delete mismatch:
debugallocation.cc:788] RAW: delete size mismatch: passed size 160 !=
requested / available size 192 / 192
This patch fixes the issue. The crash started after the roll that
brought in https://skia-review.googlesource.com/c/skia/+/382701
See fxbug.dev/71987 for more info
Change-Id: I635ce5190d82ea96e1070e0509e543934379b776
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383456
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
We no longer derive a performance benefit from this pass in practice,
and it is a very expensive compilation step. It is also prone to fuzz-
related errors.
Doc: http://go/optimization-in-sksl
Change-Id: Ief08ffac659a8fe7fe92c92b9a5da14c9f713bc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381261
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>