39296f396f..ba0bd78574
2021-03-19 jiajia.qin@intel.com Fix the assert error and inbalence parens for SSBO
2021-03-18 jmadill@chromium.org Vulkan: Use packed enum map for descriptor set index.
2021-03-18 jmadill@chromium.org Vulkan: Clean up shader buffer DS allocation.
2021-03-18 cclao@google.com Vulkan: Move CommandBufferHelper::reset() closer to constructor
2021-03-18 cclao@google.com Vulkan: Test render and sample the same texture but with different LOD
2021-03-18 gert.wollny@collabora.com scripts: Ignore "rapidsjon/..." when checking includes
2021-03-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 60fea25f23e6 to e7ef5f7d0368 (472 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 michaelludwig@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: michaelludwig@google.com
Test: Test: FramebufferTest_ES3.SampleFromAttachedTextureWithDifferentLOD
Change-Id: Ie4f7f24acffe694ad14c41958fb4a65cada012a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386753
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Previously, we would copy all the plane data into an array of half4s,
then copy and swizzle them back out. This change writes the results
directly into the result color, and doesn't require any temporary
variables.
(Motivation: I noticed this shader in some of the Mali-400 regression
cases when testing with inliner-off, so I'm looking for cases where this
code could be simplified.)
Change-Id: I7d79ad519fb53f7d8e33c4d545e8a197023cec5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386836
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit c6f78ff55d.
Reason for revert: Broke Chrome roll and MSAN
Original change's description:
> Do register allocation in GrResourceAllocator
>
> This lets us plan out the allocation of resources without
> actually committing to the resulting plan. In the future,
> the user will be able to do the register allocation, then
> query the estimated memory cost, and either commit to
> that allocation or try a different order of operations.
>
> Bug: skia:10877
> Change-Id: I34f92b01986dc2a0dd72e85d42283fc438c5fc82
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386097
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,adlai@google.com
Change-Id: I7492c12b8188ed22c3cd80fd4068da402d8d3543
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386856
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
SkDevice::getGlobalBounds() transforms the device's local clip bounds
by its device-to-global matrix. The SkDevice constructor expects bounds
to already be in its own coordinate system (SkNoPixelsDevice ought to
just take dimensions really).
For now, all device-to-global transforms are integer translates, so
this didn't dramatically change the bounds but moving forward,
image filters may cause these transforms to include rotations, skew,
and perspective (once https://skia-review.googlesource.com/c/skia/+/334040
lands).
This change to TrackingDevice is lifted from the above CL since it
may play a role in addressing fixes for chromium:1187246, and it fixes
strike cache misses from the canary runs of the above image filter CL.
Bug: 1187246, skia:11240
Change-Id: I67c8446ddbf5aaed144d439ab8d1e7998e9bfa01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386696
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is a reland of 579728eb19
Original change's description:
> Add SVG to default modules list
>
> This enables SVG to build in official builds.
>
> Change-Id: I4f64109983216baf9663061e23cc3757292ff448
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386096
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>
Change-Id: I8bb93f3881e69f7b4461981a4f0f95a87fed0976
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386557
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Every caller of SymbolTable::takeOwnershipOfString was allocating a
unique_ptr<String> instead of just moving the String object directly.
This was important, as the SymbolTable needed to return a stable String
pointer to the caller, and vector<String> is allowed to move its
elements around when it is resized.
On the other hand, deque<String> promises pointer stability even after a
resize. Replacing the vector with a deque lets us avoid allocating an
extra String object every time we call takeOwnershipOfString.
Change-Id: I8947c0900fd355c940b046a52a4c1762465b55d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386596
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Using the dedicated function is slightly faster than calling snprintf
and is documented to behave the same.
Change-Id: I9bc64066b55cf74d2369c531283c68e05bcc402c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386676
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This lets us plan out the allocation of resources without
actually committing to the resulting plan. In the future,
the user will be able to do the register allocation, then
query the estimated memory cost, and either commit to
that allocation or try a different order of operations.
Bug: skia:10877
Change-Id: I34f92b01986dc2a0dd72e85d42283fc438c5fc82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386097
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:11760
Change-Id: I1baaec529b47954018d000856912f121b4f1454a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386597
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Dump information about the Difference, Serialization,
Deserialization, and Drawing phases of Renderer/GPU text
drawing.
Add the following to your args.gn to turn on telemetry.
extra_cflags = ["-D", "SK_TRACE_GLYPH_RUN_PROCESS"]
Change-Id: If435257574b74910822dbb90cc9dbca311578fe8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385696
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
The render_passes GPU stat is backend-agnostic and gets
more to the point of what we're trying to measure. It's verified
to be stable across configs (e.g. non-msaa vs msaa) and
correctly shows effects of reducesOpsTaskSplitting.
Rob and I have an alert on this stat from perf.skia.org
Bug: skia:10877
Change-Id: I71520cf8fd311545faf05ee5c55db185ed48c6a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386561
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit a9c187e5cc.
Change-Id: Icbfb8abdfc67fc2e6428d97a6cdede2726fb56e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385596
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
The record time allocator's initial block size is 12,800
(100 * sizeof GrPipline) bytes.
This means that the fibonacci progression grows rapidly to large
block sizes. This is causing out of memory errors in Chrome and
Android as they try to allocate very large blocks.
Reduce the initial allocation to 1024 bytes to reduce growth
rate.
F *1,024 *12,800
=====================
0 1,024 12,800
1 1,024 12,800
2 2,048 25,600
3 3,072 38,400
4 5,120 64,000
5 8,192 102,400
6 13,312 166,400
7 21,504 268,800
8 34,816 435,200
9 56,320 704,000
10 91,136 1,139,200
11 147,456 1,843,200
Bug: b/182959903
Bug: chromium:1188071
Change-Id: I5ef1c736efb42b2bccd78549d129154c0857bbca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385938
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This replaces a potentially expensive tree walk with a map lookup. It
should speed up the inliner (on sksl_large) by about 4%, and speed up
the benchmark overall by >1%.
Change-Id: I68ef492d2aba6303753fad01dcbef1eaffb7a6f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386556
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
They aren't otherwise declared, but ProgramUsage::get() should be able
to find them, even if they are unread and unwritten.
Change-Id: I7200212945f9360e63b3108ab60420bcae8192c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386558
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>
All of these events use "skia.shaders" now, so that clients can enable
them independent of any other skia events.
For new APIs, add new trace events to cover (potentially) long API
calls, and give better visibility into how pipeline creation breaks
down. GL still has a few extra events around caching, but the vagaries
of what those mean (depending on what's in the cache) probably make them
more confusing than useful, so I didn't try to replicate them.
Bug: skia:11360
Change-Id: I97c7e89ad1f2f05d7b90bd783a20a6b8c2036e8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386157
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reland 188443be8d without the DMSAA bots
to ensure nothing else changes.
Original change's description:
> Add tooling support for dmsaa
>
> Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from
> tooling code. When dmsaa is set, SkGpuDevice draws everything
> antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots
> to run them.
>
> Bug: skia:11396
> Change-Id: I165e89434b733f7b02312cea0e6649812528083b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com
Bug: skia:11396
Change-Id: Icb45097e0a34543dc577fa32f19a692e90643a35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386338
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 188443be8d.
Reason for revert: It looks like non-dmsaa bots might have been
affected. Let's land first without the new bots to make sure nothing
else changes.
Original change's description:
> Add tooling support for dmsaa
>
> Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from
> tooling code. When dmsaa is set, SkGpuDevice draws everything
> antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots
> to run them.
>
> Bug: skia:11396
> Change-Id: I165e89434b733f7b02312cea0e6649812528083b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com
Change-Id: Ib805b417ebd34d1fad79e0e1fe625765ee487f65
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386336
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Chris Dalton <csmartdalton@google.com>
This test causes the Adreno 330 driver to crash, and does not pass on
Quadro P400 in wasm. The CPU test confirms that we can get it right,
even if not all drivers do.
Change-Id: I5ffb72ac647a49dab7130ab2c6e94f587ded6cf9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386216
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>
Previously, finalizeFunction took the FunctionDefinition as its input.
This change makes it possible to calculate statistics in
finalizeFunction, such as "how many return statements exist in this
function?" and incorporate that data in the FunctionDefinition at
make_unique time.
Change-Id: I72bb67c802f5416588a5516dfcb61aa56ccf9684
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386057
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>
By pass the GrTextBlobCache, and create the op directly, with
the op owning the GrAtlasSubRun.
The new types of SubRuns have the GrAtlasTextOp's Geometry
embedded in them because there is a 1-to-1 correspondence
between the SubRun and the Geometry.
There is a lot of duplicate code. I wanted to keep the
implementation similar before I started top optimize
the direct code path.
Change-Id: I86162a527613e092c184932f4496f59c07793d55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/336445
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 99b2d04d31.
Reason for revert: no benefit
Original change's description:
> Add 'kOnlySingleReturn' complexity type to the Inliner.
>
> This can be used in followup CLs to test various forms of inliner
> simplification. (More info: http://go/optimization-in-sksl-inliner )
>
> Change-Id: Icd12a1ae1481c9aeacf3f11e85872fecfa972ec3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384836
> 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>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I1be7e0b08cf1c908823784c836c1fd680dfbd6f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386098
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Due to ongoing simplifications, the code had two variables that always
referred to the same object (inlineStatements, inlinedBlockStmts) and
reserve_back was called on it twice. The amount of space being reserved
was also wrong, as it accounted for out-param writebacks, which are no
longer supported.
We now only have one name for it, and reserve all the space we need the
first time.
Change-Id: If7b52ff8cef5bc7d4610384b8362f8a6a420f2ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385937
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:11754
This image is invalid - SkCodec draws *something* but it's not
particularly meaningful. Remove it from our CodecSrc tests and add it to
BadImage tests so that we still verify we don't crash (etc) but we no
longer expect to be able to draw it using the platform generator.
Change-Id: I4781d645896d9f01afbd70fb0c5acfd262dd3169
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385880
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
This enables SVG to build in official builds.
Change-Id: I4f64109983216baf9663061e23cc3757292ff448
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386096
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
It is difficult to do this both efficiently and correctly while honoring
GLSL semantics (which require the lvalues to be kept distinct, even when
they point to the same variable). We could make it work by making copies
of every out parameter in each direction (going in for inouts, and
coming out for outs and inouts).
However, this could be self-defeating if it makes it harder for the
driver to track variable lifetimes. Simply opting out of inlining these
functions entirely seems like the best tradeoff; let the driver optimize
them if it can, and we can enjoy reduced complexity in the SkSL inliner.
Change-Id: I62f7b4550cc181cfe789e4f2ff4e408ba1baf9cb
Bug: skia:11326
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370257
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
If there was "newState" passed in by the client during a flush we were
setting that state but then also changing it for present right after.
We don't support having this newState and present at the same time so
this was clearly a bug.
Change-Id: Ia5101994c11ef9c40ee7b7d9bac8150ffc242567
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385881
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
It turns out it is not legal to pass the results of OpAccessChain as a
function argument, for... reasons. This CL switches us over to passing
the argument via a temp variable instead.
Bug: skia:11748
Change-Id: Ib5e86c1d000655ebd7bb62ceea6a27b823808645
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385936
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This allows us to remove 100 LOC from the inliner and is very unlikely
to affect any existing benchmark. We don't have any evidence to support
the idea that a one-iteration `for` loop with `continue`-based exits
will be any faster than a standard function call on any existing GPU.
Our fragment processors are generally written to avoid early returns,
in large part to avoid hitting this path.
This drastically impacts BlendEnum.sksl (which can no longer flatten out
a switch over every blend function in SkSL) but is otherwise a wash.
See: http://go/optimization-in-sksl-inliner suggestion 4(a)
Change-Id: I1f9c27bcd7a8de46cc4e8d0b9768d75957cf1c50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385377
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from
tooling code. When dmsaa is set, SkGpuDevice draws everything
antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots
to run them.
Bug: skia:11396
Change-Id: I165e89434b733f7b02312cea0e6649812528083b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The vision here is for Register to be a not-yet-allocated
surface, so that we can allocate Registers, then check
the memory consumption of that allocation before committing
to it.
Bug: skia:10877
Change-Id: I06cd3a66b9794b702bfd08ab30c644d0d2f2c945
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385496
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
They don't inspect Expressions at all, but by default, a ProgramVisitor
will completely traverse every Expression. This change improved local
runs of nanobench on sksl_large by ~7%.
Change-Id: I7604ffa220c6081c3cd39b5a22520fb41421fcba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385878
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This put the coverage for do-while loops on par with for loops.
Change-Id: I53e0d733edd02a6a139792a8d74c68116453e5ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385500
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This makes it easier and faster to check for void types, especially
when you don't have a Context.
`Type::isOpaque` would previously return true for void, and this CL
preserves that behavior to avoid changing the meaning of existing code.
Change-Id: I6e1699dd8daee4c5fa8cf4746bab84c1d3fc15d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385499
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>