Change-Id: I7d12c81b195144de217c928f5537665cae21c644
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281580
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Pre-allocating space for one reference to each Label
cuts down a bunch of tiny little mallocs (essentially
moving them to the stack).
Most labels are used once, with a tail, and never 0.
Change-Id: I2862b628e1c3789d32b1600023e0b1e8fa0ad160
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281622
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I7506a6c72eae30148fcae72ea81af5278a252c1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281620
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Change-Id: I8bad4ba28034400890f52cd1c4ef0f907de17007
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281579
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Fixes location of executable for xcode project generation.
Change-Id: I256c4a8f5e784f290f872094ada9949f23e6050b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281578
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Supports buffer creation and destruction.
Bug: skia:9935
Change-Id: I6d8c6d67209a8857989a9384818272e7108177ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281577
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Note to the reviewer: Look at tests/util.js first and then
look at the others. Gerrit lets you ignore whitespace changes,
which I would recommend for this.
This emulates tests on the C++ side and dramatically reduces
boilerplate on the test code.
This also uses the beforeEach(async () => {}) trick to save
a lot of promise resolutions before each tests.
I try to clean up the style a bit as I go, seriously thinking
about adding eslint for at least the tests.
Change-Id: Iced4abb57f66572035ab5d1a54b374055e8aaa58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281439
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Change-Id: Ie877e995642fe6be48b7e242aa955e87ecc14fb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281385
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
bit_clear() is just another bit_and(),
and bytes() is a way of expression pshufb
that we never really use (yet).
Can always add them back later, but there's
some extra complexity to think about for each
that I'd like to not think about now:
- common sub-expression elimination between bit_and and bit_clear
- large constant management JIT'ing bytes
Change-Id: I3a54afa963231fec1d5de949acc647e3430ed0d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281557
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:10102
Change-Id: I4e11b6396574e6f86e31b658bfd2a5fe45b89489
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281507
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
The CheckGeneratedFiles bot only required rewriting
.gn files, while the presubmit wants both .gn and .gni files.
It also appears that the #includes rewrite script runs on
both the presubmit and CheckGeneratedFiles bots.
These presubmits run on the CQ before landing right?
If so, no need for them in the CheckGeneratedFIles bot at all.
And of course, format .gni files.
Change-Id: Icd4526d62f85088862ad93566cc9ace11dc3e33f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281505
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I51eab1ccf29721bba842d77c9d2b208ad523321d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281388
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: I16c392abe36d7aac7be2dee47116d873a8787afd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281378
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is so we can cleanly move to our Debian10 build image which doesn't have a global install of gn.
Bug: skia:9438
Change-Id: Idcbc289580a35590250e2f755f80910f42020fc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281476
Auto-Submit: Weston Tracey <westont@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Bug: skia:10078
Change-Id: I3ce0d97f8ada55403cc3f88bb16659085449ea29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281207
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
We can use the new_id array to reorder the program in place,
saving another program-sized malloc().
Change-Id: Ia963d27ea4ad7ce52256786999ce07b376bd44a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281429
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Formats can be renderable but not support MSAA.
Change-Id: I33fd295cce0b4b11a0c132c40a85fc7a7d4973b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281477
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
It needs to be the inverse transpose of the upper-left 3x3.
Change-Id: I6c6441c394f4aa9e39a810f97b27567f73dcc43a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281215
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
It's just as easy to calculate the death time directly as it is to use
Usage, and it saves some allocations and a little CPU time we don't need
to spend.
Left Usage in place in schedule() for you,
but did leave in the slight tweak to the assert.
Change-Id: I285833e3aaf855e7bc3cc7cf1ff826a5c01313e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281235
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
745e071241..1cc49bb2e2
git log 745e071241ab..1cc49bb2e230 --date=short --first-parent --format='%ad %ae %s'
2020-04-02 jmadill@chromium.org Squash State::mContext and State::mID.
2020-04-02 geofflang@chromium.org Include the fragment output locations in the program cache key.
2020-04-02 thakis@chromium.org Vulkan: Use shader stage specific barrier
2020-04-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 1fff36235504..0b66fa3b62cb (1 commits)
2020-04-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 5cf1e9a31c90..cb58662302c8 (7 commits)
2020-04-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src c37c94929bf5..f20c0d7971c6 (1 commits)
2020-04-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src f5504529553f..499f6df688c9 (7 commits)
2020-04-02 cwallez@chromium.org Suppress failures after Win Intel driver upgrade.
2020-04-02 timvp@google.com Vulkan: Don't detach separable shaders in Program::detachShader()
Created with:
gclient setdep -r third_party/externals/angle2@1cc49bb2e230
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/+/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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
Bug: None
Tbr: michaelludwig@google.com
Change-Id: I189fd12531657810808d82dcf4980bd54ebaa8a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281391
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Otherwise if any draw flattens the image all subsequent draws of
the image use the flattened texture.
Change-Id: Id1aa58e33f2ec5a13cf1ff75d15f6137aafd556e
Bug: skia:9570
Change-Id: I3a45c4e2b9fead3a5a2500bf5f738ab5d1fbfc17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281336
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This is a reland of d84b691950
Original change's description:
> Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
>
> This is a reland of e8c963d474
>
> Original change's description:
> > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> >
> > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This means we take DOMMatrix everywhere now.
This reduced the *_makeShader benchmark by ~25% (4 us -> 3 us)
and cleaned up several callsites.
Trimming this down saves ~3kb in uncompressed code size.
Change-Id: Ie677c7ebb7bc97ed8cd4d4851a039b78b6f8079d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281018
Reviewed-by: Mike Reed <reed@google.com>
Not too tricky, and saves a program copy.
Change-Id: I3f7e97c1f1935df50905b6cc1ee4de33da2148ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281285
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This CL fixes a bug in the logic that checks whether there's an image mounted on the attached iOS device.
Currently this is determined by checking whether strings "ImagePresent: true" or "ImageSignature:" are present in the output of command "ideviceimagemounter --list". However, these strings do not match the command's actual output:
# No image mounted.
$ ideviceimagemounter --list
Status: Complete
# Image mounted (fake signature for illustrative purposes).
$ ideviceimagemounter --list
ImageSignature[1]:
0: Rm9yIGlsbHVzdHJhdGl2ZSBwdXJwb3NlcyBvbmx5LiBUaGlzIGlzIG5vdCBhIHJlYWwgc2lnbmF0dXJlLg==
Status: Complete
As is, the recipe fails to detect that an image is already mounted on the attached iOS device. The recipe then tries to mount one, which makes the "ideviceimagemounter" command fail with "Error: ImageAlreadyMounted". The following example shows how to reproduce this error:
# Initially no image is mounted.
$ ideviceimagemounter --list
Status: Complete
# Mount an image.
$ ideviceimagemounter DeveloperDiskImage.dmg DeveloperDiskImage.dmg.signature
Uploading DeveloperDiskImage.dmg
done.
Mounting...
Done.
Status: Complete
# Verify that the image is mounted.
$ ideviceimagemounter --list
ImageSignature[1]:
0: Rm9yIGlsbHVzdHJhdGl2ZSBwdXJwb3NlcyBvbmx5LiBUaGlzIGlzIG5vdCBhIHJlYWwgc2lnbmF0dXJlLg==
Status: Complete
# Try to mount an image when one is already mounted.
$ ideviceimagemounter DeveloperDiskImage.dmg DeveloperDiskImage.dmg.signature
Uploading DeveloperDiskImage.dmg
done.
Mounting...
Error: ImageMountFailed
Checking for presence of string "ImageSignature" in the ideviceimagemounter command's output seems to solve the problem.
In the process I also discovered that self._run() requires keyword argument stdout=self.m.raw_io.output() in order to return the command's output. As is, the returned stdout is always blank.
Note to reviewer:
- Patchsets 1 to 11 iterate on a potential fix.
- Patchset 12 reproduces the bug. See the failing tryjob.
- Patchset 13 tries the fix. See the successful tryjob.
- Patchsets 14+ clean up the CL.
Change-Id: I3ca1cdbf4bfa450c3e87d6d87b5f615f28c4aaba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281058
Reviewed-by: Weston Tracey <westont@google.com>
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
eliminate_dead_code() and specialize() both use temporary
Builders but there's no benefit to them, at least for now:
- eliminate_dead_code() never introduces new instructions,
so there's nothing for Builder's CSE to catch, and there
never will be.
- specialize() only replaces instructions 1:1 today,
so as written there's nothing much builder can CSE[1];
any CSE opportunities have already been taken.
[1] technically we can CSE bit_and and bit_clears together,
but that's peanuts, and I'm thinking the real fix there is
eliminating Op::bit_clear and just keeping bit_and.
Trims about 30% off `nanobench -m SkVM_Overhead_VM`.
Change-Id: I1d73d502426db8eec094b37cc63677a2b69f63a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281227
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: angleproject:4538
Change-Id: I54f30fb7a3aac593e6978baa54458a44e408f9b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281231
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: Ia5ffbc3314c7b05bab06e2d521871961ec051a38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280863
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: Eric Boren <borenet@google.com>
It's clearer to see the flow of data this way and to read each pass'
implementation without all the pointer indirection, and move semantics
should let this be just as efficient.
Change-Id: I1ac211fbe54bec37de6d126eec0c211573c2a568
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281218
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This finishes up the main refactoring.
Still some follow-ups I want to try.
I got tired of typing usage.users(id) so I converted that to operator[],
which I think is clear for now. If we add more methods that don't refer
to the users, we can undo?
Change-Id: I0ac563cfb1899f7a3f8b2cb6d50ca1646dd05071
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281216
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:10098
Change-Id: If46bab35b0b7bfcb45880ca9f73f3409fd8df80c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281199
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The color type used to influence the GrPixelConfig and the swizzles
used with the proxy and its GrTextures. So we had to create a new proxy
if the same API texture was used to fulfill a promise image of a
different color type. That has all been removed or lifted out of proxies
and into views. So now it is fine to reuse the same proxy/GrTexture with
a different color type.
Also remove unit test that checked required a new GrTexture be made if
a different color type was used.
Bug: skia:10078
Change-Id: Ib74c419b5d54d382ea95720af7026640e35013f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281056
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Seems nicer to keep encapsulated in a program->program pass
so nothing upstream of it has to think about liveness.
I will be circling back around to profiling the cost of these
tempoaries, copies, etc. I just want to start writing them as
if cost were no object first.
Change-Id: I1d1187b521fbe963e720e0d8de90316a549f7797
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281182
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:9984
Change-Id: Ib79cf2509f5f92672cbb0b6060b8b33f99e9ac28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281162
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>