Commit Graph

53494 Commits

Author SHA1 Message Date
Mike Klein
ff4decc35e add fast_mul(F32,F32)
This is just like mul(F32,F32) but optimizes 0*x == 0.
Use it in SkSLVMGenerator; sksl already applies this optimization.

PS2 has a sneaky version using % as a fast_mul() operator, and
PS3 has a sneakier version using ** instead.

We could of course write this all out using fast_mul() the long way,
but I found that quickly became difficult to read.

Change-Id: Iae35ce54411abc00e7729e178eb6a10f151a5304
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368838
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-11 01:13:01 +00:00
Chris Dalton
b849f7a791 Remove shims for reordering indirect draw command signatures
Change-Id: I0eb48cc8a7721cc0fbdfa579b36db5e6ed0aa695
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368917
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-02-11 00:19:35 +00:00
Brian Salomon
9374617a4c Disable caching of GrTextures in promise images.
Leave the code to support it in place until we know if this causes
a regression.

Change-Id: Ic9f6a42cb83cc82a33a534d3f98cb9aaf11f813f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356998
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-10 23:53:54 +00:00
Greg Daniel
84b0233bb3 Rename vulkan memory allocator buffer usage enum values to be more specific.
These renames need to be staged so we can update chrome which has their
own implementation of GrVkMemoryAllocator.

Bug: skia:11207
Change-Id: Ic68927217fe0314cdba1b1aa7ffd80261cb5e646
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368856
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-10 23:03:44 +00:00
Julia Lavrova
8d5ccce163 Glyph positioning in RTL empty lines
Bug: skia:11258
Change-Id: Icbb34e571ba53e893b2887c963a46677b16b43e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368754
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-02-10 22:27:18 +00:00
Brian Osman
73122aa45f Use guarded_divide in more blend functions
Fixes another instance of anglebug.com/2098 with advanced blend
functions.

Change-Id: I91863723d8b4c33ab2f5a527fe0374e8947bba16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368813
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-10 21:59:26 +00:00
Florin Malita
792c2cb44e [skottie] Sphere effect lighting
Plumb lighting props and implement a Phong lighting model.

This is ~40% slower with the SW backend - to mitigate, construct two
runtime effects and only apply fancy lighting when needed.

Change-Id: If6f71253e7adc148f6d5cf5fbde2c1dff977f669
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368246
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-02-10 21:34:57 +00:00
Julia Lavrova
39caaac7fd RTL Glyph positioning
Bug: skia:11257
Change-Id: I297763c9585b988f5f89fd87b596c39220115f6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368537
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-02-10 20:00:14 +00:00
John Stiles
0ac6c15075 Reduce self-assignment expressions (x = x) into just x.
Change-Id: I44356aa781f208f4941dbeb617a30318e36c1081
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367062
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-10 20:00:05 +00:00
Robert Phillips
2735837989 Handle degenerate viewMatrix in draw_shape_with_mask_filter
For the specific fuzz in question the viewMatrix is:

0 0 0
0 0 0
0 0 1

Bug:1174637
Change-Id: Ia07fe7255de7aff3df0c8cc11da7e90434392f29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368668
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-02-10 19:41:08 +00:00
James Clarke
b8c0dab90b Add UWP support
Bug: skia:11102
Change-Id: I4ed9e44099cd780c5cdede3eb179c0e6a92d3ce5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345219
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Chris Bracken <cbracken@google.com>
2021-02-10 19:04:42 +00:00
John Stiles
a0e407d4b7 Add SkSL test for matrix equality/inequality operators.
Disabled on Adreno 5xx/6xx as the tests do not pass on those GPUs:
http://screen/3Dkgs9syj37cjBV

Change-Id: Ib935d01e8f06dbfe7decd5cc4e52e0688b48be08
Bug: skia:11306, skia:11308
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368805
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-10 18:57:22 +00:00
Robert Phillips
acc6b158ff Handle overflow of accumulated rect perimeter in SkDaskPath cull_path
The fuzzer test case was:

-15,-11  ------> huge,-11
   ^                |
   |                v
-15,5000 <------ huge,5000

where the 'huge' x-value caused the accumulated perimeter to overflow.

Bug:1175370, skia:11307

Change-Id: Ic6760d38c29c440d2d4fcb225a5c556e56a992f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368317
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-02-10 18:32:12 +00:00
Brian Osman
d2ade2c636 Replace 'dogben' with 'brianosman' in client code search page
Change-Id: Iafa06188478991896269aa10f4a681a27e55d24e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368811
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-02-10 18:04:12 +00:00
Adlai Holler
6f8fbb5306 Remove intermediate flushes from the resource allocator
If this works out i.e. no regressions, we can cut down the
resource allocator API before rejiggering it for budget estimation
(dry run).

Bug: skia:10877
Change-Id: Ic6388cffc688789592ff3d6a946e5176dc4fd052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368806
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-10 18:03:52 +00:00
Jorge Betancourt
0e604ca7b0 [canvaskit] add audio asset support to skottie-bindings
Change-Id: If4c36f0261a18ed068cd745a4c454c127d0e96bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360916
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-02-10 17:19:12 +00:00
John Stiles
4c15170960 Add support for enum types in SPIR-V code.
- is_float: Calling `type.columns()` on an arbitrary type isn't safe; it
will assert if the passed-in type is not a scalar/vector/matrix/array.
This was asserting when being passed an enum type. Additionally, this
code would have returned true for arrays of float but that does not
appear to be the intent.

- is_signed: This now returns true for enum types, as these boil down to
int for our purposes.

- is_unsigned/is_bool: Updated structurally to match is_float and
is_signed, but behaviorally unchanged.

- getActualType: now treats enum types as int. This prevents us from
declaring the "OpTypeInt, 32, 1" type twice, which triggers a validator
error: "Duplicate non-aggregate type declarations are not allowed."

These changes are necessary to properly compile Enum.sksl in SPIR-V with
optimizations disabled.

Change-Id: Ib7ae00239c9f87c1a9463e0c8745622743e62cf6
Bug: skia:11304
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368576
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-10 17:14:14 +00:00
skia-autoroll
a028936b52 Roll ANGLE from 4968f6f2b109 to 0f74ae58ed18 (19 revisions)
4968f6f2b1..0f74ae58ed

2021-02-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from f640b7005a0c to 4dc6ccfad74a (7 revisions)
2021-02-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 02dbd1fa1c75 to 95cbe3e024b0 (423 revisions)
2021-02-10 timvp@google.com Vulkan: Match min/magFilter to chromaFilter
2021-02-10 syoussefi@chromium.org Vulkan: Fix updates to element buffer
2021-02-10 timvp@google.com Capture/Replay Don't capture invalid commands
2021-02-10 m.maiya@samsung.com Modify data type of ActiveTextureMask and ImageUnitMask
2021-02-10 m.maiya@samsung.com Use const reference when possible
2021-02-09 jmadill@chromium.org infra: Update to starlark config.
2021-02-09 senorblanco@chromium.org Add an option to use "metal" as ANGLE_DEFAULT_PLATFORM.
2021-02-09 ynovikov@chromium.org Don't test 32-bit Android Vk on CQ
2021-02-09 timvp@google.com Tests: Add Bus Simulator Indonesia trace
2021-02-09 syoussefi@chromium.org Roll VK-GL-CTS from b29bf0434c16 to 28d3d98b040d (82 revisions)
2021-02-09 m.maiya@samsung.com Support optimized bitsets that need more than 64bits
2021-02-09 m.maiya@samsung.com Vulkan: Leverage ExtendedDirtyBitType
2021-02-09 jmadill@chromium.org infra: Upgrade XCode version to "12a7209".
2021-02-09 cnorthrop@google.com Tests: Reduce capture_replay_test exception list
2021-02-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from d6c9a9f3f705 to f640b7005a0c (1 revision)
2021-02-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 266614a36dbd to 9d35d544ce96 (1 revision)
2021-02-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 82fe35376dee to 02dbd1fa1c75 (492 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 borenet@google.com,robertphillips@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: borenet@google.com,robertphillips@google.com
Test: Test: angle_perftests --gtest_filter=TracePerfTest.Run/*bus_simulator_indonesia*Test: Test: capture_replay_tests.py --gtest_filter=*ES2_Vulkan_SwiftShader
Change-Id: If74c41e364dba11bbfe3d284f4a19104c1398fed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368731
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-10 17:14:06 +00:00
Brian Salomon
b3c63dc093 Speculative fix for assert failing in makeTextureImage.
Bug: chromium:1174605
Bug: chromium:1174393
Change-Id: I52557d3a9b8b045905356a4d27dac13cdcf615fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368807
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-02-10 17:00:12 +00:00
John Stiles
01cdf0122f Reland "Add support for matrix == and != in Metal shaders."
This reverts commit 4908a24d4b.

Reason for revert: test fails on Adreno 5xx/6xx, will land tests
separately and disable on Adreno

Original change's description:
> Revert "Add support for matrix == and != in Metal shaders."
>
> This reverts commit c501857188.
>
> Reason for revert: breaking many bots
>
> Original change's description:
> > Add support for matrix == and != in Metal shaders.
> >
> > We need to polyfill an operator== and != when these are first
> > encountered in the code.
> >
> > Change-Id: I539c838ee1871bcb0c4b66abb8a4a0f91146cd4f
> > Bug: skia:11306
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368496
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
>
> Change-Id: Id583109a0d167c2c58a57644b14cd5f49d670737
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11306
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368801
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Bug: skia:11306
Change-Id: If7c628b8c7a2ce40d6c88599a7660ff91c4ac67a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368804
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-10 16:13:30 +00:00
Brian Osman
55761ae5e6 Change pipeline stage callbacks to support mangling type names
Structs, enums, and global variables are all going to require name
mangling. Move that to a separate virtual on the callback. More
importantly, the generator is going to need to do type-name substitution
inside the function declaration string, so the contract has shifted:
The generator constructs the entire function declaration line (using the
mangled name it gets from the new callback), then it calls
defineFunction with two strings, and a flag indicating if this is main
or not.

Bug: skia:10939, skia:11295, skia:11296
Change-Id: I535eee9bfbb2337013b539908fe3d658ec3b2dbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368397
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-10 16:08:11 +00:00
John Stiles
0bd5578c31 Replace Metal constant keyword with const.
"Constant" is an address space qualifier and can't be applied to a
local variable. "Const" in GLSL (and hypothetically SkSL) is meant to
apply to a constant expression regardless of address space.

Our previous test was not finding any error because the optimizer was
eliminating the constant expressions entirely.

Change-Id: I6cfe8e2a621c79945b33e0166780d81e79890a1b
Bug: skia:11304
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368517
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-10 15:23:25 +00:00
Greg Daniel
da6426141f Reland "Only store resources in the GrResourceCache::fScratchMap that are available to be scratch."
This reverts commit 4a0bc2b344.

Reason for revert: reland with crash workaround

Original change's description:
> Revert "Only store resources in the GrResourceCache::fScratchMap that are available to be scratch."
>
> This reverts commit 1a2326363a.
>
> Reason for revert: breaking win10 quadro400 perf bot on vk and vkmsaa
>
> Original change's description:
> > Only store resources in the GrResourceCache::fScratchMap that are available to be scratch.
> >
> > Currently when we create a scratch resource, we immediately add it to
> > scratch map and it will stay there until we delete the resource. The one
> > exception to this is adding a unique key will remove a resource from
> > the scratch map. This means there are resources in the scratch map that
> > can't be returned when looking for a scratch because they are either
> > already in use by something else or their budget was changed to
> > unbudgeted. This means everything time we do a scratch lookup, even
> > after finding the list of resources that match a key, we still have to
> > iterate that list to see if we can use that resource or not.
> >
> > The problem comes when we may have lots of resources that all match the
> > same key (think 1000s of identical buffers). Then the cost of iterating
> > this list starts to get very high.
> >
> > This change makes it so only resources that can actively be used as a
> > scratch at that moment are stored in the scratch map. Thus when we find
> > a scratch resource we pull it out of the scratch map. When that resources
> > refs go back to zero it is added back to the scratch map. Similar removal
> > is also now used for changing a resource to and from budgeted.
> >
> > Change-Id: I52b415d0e035dfc589f3d712be85799a56827bf0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367976
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: I1e57e10e75f930adfecb0e4167c1d6269798c893
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368236
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

# Not skipping CQ checks because this is a reland.

Change-Id: Ied3995b963f8383954fc4a53a1de9e17234e5e6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368239
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-10 14:54:29 +00:00
Adlai Holler
cc25d53420 Revert "Migrate uses of deferred proxies to lazy proxies"
This reverts commit 990a0d8b65.

Reason for revert: Keeping it. Deferred proxies are uploaded later than lazy and we want that for this use case.

Original change's description:
> Migrate uses of deferred proxies to lazy proxies
>
> A follow-up CL removes the deferred proxies system entirely.
>
> Bug: skia:11288
> Change-Id: Ic5b3ce820ea946f6ae27bd763c0f389caf8863d1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366716
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:11288
Change-Id: I9ced532d013805afae3b20baa53cab31cae2b953
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368797
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-02-10 14:52:53 +00:00
Greg Daniel
4908a24d4b Revert "Add support for matrix == and != in Metal shaders."
This reverts commit c501857188.

Reason for revert: breaking many bots

Original change's description:
> Add support for matrix == and != in Metal shaders.
>
> We need to polyfill an operator== and != when these are first
> encountered in the code.
>
> Change-Id: I539c838ee1871bcb0c4b66abb8a4a0f91146cd4f
> Bug: skia:11306
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368496
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: Id583109a0d167c2c58a57644b14cd5f49d670737
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11306
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368801
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-10 14:25:54 +00:00
Greg Daniel
fda458621a Update workaround for devices with broken vkQueueWaitIdle.
This is essentially just changing how we do a workaround we
already have in the code. It also does it in release.

Change-Id: I53b6539beb3e919497f2a13f583108ec10f1b9af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368556
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-10 14:24:12 +00:00
Michael Ludwig
140adc6762 Revert "Delete deprecated alpha threshold header"
This reverts commit 5441188637.

Reason for revert: this couldn't really be breaking angle-only sksl compilation, right? Let's find out!

Original change's description:
> Delete deprecated alpha threshold header
>
> Bug: skia:11230
> Change-Id: Icd927cfdcca71a48dce16bcd6c40489dad92a259
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368238
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,reed@google.com,michaelludwig@google.com

Change-Id: Ie5b51e6cca39acb34dbf7b1e702209aba69ea437
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11230
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368798
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-02-10 14:09:03 +00:00
Adlai Holler
9e2c50edaa Revert "Remove deferred proxy machinery"
This reverts commit a3987cc587.

Reason for revert: Keeping it

Original change's description:
> Remove deferred proxy machinery
>
> These aren't used any more in favor of lazy proxies.
>
> Bug: skia:11288
> Change-Id: I992e1a3dd343e0ebc7f3a4f18c0054453dfebbaf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366896
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com

Bug: skia:11288
Change-Id: Iafa9ed18a772e451349dfad61ee462df963028be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-02-10 12:28:42 +00:00
skia-autoroll
7f942e46fd Roll Dawn from e7e42ebbed90 to 02fd17c75403 (10 revisions)
https://dawn.googlesource.com/dawn.git/+log/e7e42ebbed90..02fd17c75403

2021-02-10 senorblanco@chromium.org Implement a toggle to disable sample variables.
2021-02-10 senorblanco@chromium.org Skip testing of stencil textures where non-readable.
2021-02-09 kainino@chromium.org Revert "Vulkan: Fallback to XCB for Xlib surfaces"
2021-02-09 enga@chromium.org Dawn wire fuzzer: Fix nullptr dereference
2021-02-09 dsinclair@chromium.org Remove the use_tint_inspector toggle.
2021-02-09 cwallez@chromium.org Vulkan: Fallback to XCB for Xlib surfaces
2021-02-09 senorblanco@chromium.org Skip testing of SNORM formats where non-readable.
2021-02-09 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 4a7981e300f3 to 7b7d69854d8d (19 revisions)
2021-02-09 cwallez@chromium.org Fix compilation using CMake on Linux
2021-02-09 cwallez@chromium.org Vulkan: VK_EXT_subgroup_size_control should be chained on the stage

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 4a7981e300f3 to 7b7d69854d8d

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC kainino@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-Debug-Dawn
Bug: None
Tbr: kainino@google.com
Change-Id: Ida38bfdd9dba5a9bf3be2e24716714b353ce4f12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368642
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-10 06:32:29 +00:00
skia-autoroll
f35c530b07 Roll Chromium from 983950b467bc to 8cbe693bd2e0 (368 revisions)
983950b467..8cbe693bd2

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC borenet@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:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: borenet@google.com
Change-Id: Ia3ab977f4d8a572b6f06b13e97e4ae497583c431
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368639
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-10 05:13:19 +00:00
skia-autoroll
22b050e922 Roll SwiftShader from 9d35d544ce96 to 9677c6d28278 (5 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/9d35d544ce96..9677c6d28278

2021-02-10 capn@google.com Regres: Remove GLES tests from CI test runs
2021-02-09 capn@google.com Benchmark time spent by all threads
2021-02-09 natsu@google.com Ignore two unused variables in llvm
2021-02-09 natsu@google.com Revert "Enable named mmap usage on Android"
2021-02-09 amaiorano@google.com VulkanWrapper: fix loading driver when lib path can be resolved by dlopen

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC borenet@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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: borenet@google.com
Change-Id: Iebcecd2a0cc7e5360dd0b29f0b57a201237fb9cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368641
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-10 05:11:51 +00:00
Brian Salomon
ec04e062f3 Drop AA on quads that are extremely thin before AA insetting/outsetting.
Bug: chromium:1174186
Change-Id: I91a88d2d57150dee37f08bc4270d399abfd0d60d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368497
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-02-10 02:43:35 +00:00
Stan Iliev
e89b50ae05 Android roll broke with a compilation error:
frameworks/base/libs/hwui/jni/Shader.cpp:243:37: error: no matching function for call to 'get'
    sk_sp<SkRuntimeEffect> effect = std::get<0>(result)

Revert "Remove deprecated form of SkRuntimeEffect::Make."

This reverts commit 1cda194366.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Remove deprecated form of SkRuntimeEffect::Make.
>
> Chromium has migrated to the new API at https://crrev.com/c/2675855.
>
> Change-Id: Id4af77db2c462348e8031d28f56e543ad619c19c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367060
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=mtklein@google.com,brianosman@google.com,johnstiles@google.com

Change-Id: Ie18f865f3b7f5b0263db1e52b19cf6faa0500fdd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368616
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2021-02-10 00:05:10 +00:00
Michael Ludwig
5441188637 Delete deprecated alpha threshold header
Bug: skia:11230
Change-Id: Icd927cfdcca71a48dce16bcd6c40489dad92a259
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368238
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-02-09 23:35:19 +00:00
John Stiles
c501857188 Add support for matrix == and != in Metal shaders.
We need to polyfill an operator== and != when these are first
encountered in the code.

Change-Id: I539c838ee1871bcb0c4b66abb8a4a0f91146cd4f
Bug: skia:11306
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368496
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-09 22:53:18 +00:00
Jim Van Verth
2271b54c1e Implement indirect draws in Metal
Bug: skia:11291
Bug: chromium:1172543
Change-Id: I67488a6852151c8ac2bd69dc0149930ca511b945
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368396
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-02-09 22:25:27 +00:00
John Stiles
e2c9d3c034 Rename bool highp to a non-reserved keyword.
We can't name our variables after GLSL keywords. This worked in the past
because our optimizer was able to optimize away `highp`, as it is
always constant.

Change-Id: Idbd97cad4f10da72f610701c83b0736e96a06626
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368419
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>
2021-02-09 22:22:16 +00:00
Ben Wagner
53375a713f GM glyph_pos correct advance placement.
Glyph advances are based on the origin, not on the glyph bounding box.
Draw the tick marks for the advances starting from where the run of
glyphs was drawn.

Change-Id: I217c10a79835ad46e0178bb77ab8e575e36704ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368418
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-09 22:21:10 +00:00
Ethan Nicholas
cfefec07ab Added SkSL DSL switch statements
Change-Id: Iccb6f1bb65dce5b313716dfdf3a4eb87b9bb4fc3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368058
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-09 22:11:55 +00:00
Julia Lavrova
f756979dbf Fixing a crash in Flutter Text Editor
Change-Id: I01b92f7c5f6030afae164ba2999e3aa8168597b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368417
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-02-09 22:10:55 +00:00
John Stiles
1cda194366 Remove deprecated form of SkRuntimeEffect::Make.
Chromium has migrated to the new API at https://crrev.com/c/2675855.

Change-Id: Id4af77db2c462348e8031d28f56e543ad619c19c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367060
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-09 21:27:34 +00:00
Brian Osman
62b039b36d Add .stage output to skslc for runtime effects
This emits SkSL that is more-or-less what the compiler re-ingests when a
runtime effect is used to create a GrFragmentProcessor.

Change-Id: I0926be44fc4493e722a5edc18198e161e4192cde
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367883
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-09 20:11:56 +00:00
Brian Osman
cb208d4c1f Stop exposing non-square matrices to runtime effects
The SkSL names of these types were inaccessible (in the private symbol
table), but we had inadvertently made them usable via the GLSL aliases.

Bug: skia:10680
Change-Id: I2e22db39c623c872dca837a22ff6f99cf5db46b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368251
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-09 19:57:06 +00:00
John Stiles
34c098d7f8 Add SkSL test demonstrating missed optimization with +=.
Currently, SkSL is able to constant-propagate `x = x + constant` into
`x = constant` when the starting value of x is known. However, it is not
able to do the same optimization for `x += constant`. This test
demonstrates that once += is encountered, we lose track of x's value and
can no longer propagate its value.

(This is equally true of all the op-assignment operators, += -=
*= /= etc.)

Change-Id: I3523e96baf9a73982cf3b09f0d23b95adacf106b
Bug: skia:11192
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368248
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-09 19:17:26 +00:00
Ben Wagner
f5cbbc6c15 SkScalerContext to handle hairline paths.
Create an actual hairline path instead of a filled path. Allow metric
and image generation for glyphs to handle hairlines in the event a color
glyph has an outline and a hairline is needed. This also fixes glyph
bounds issues with path based glyphs drawn with hairlines.

Stroke+Fill is not handled very well, but is currently being deprecated
and so given less weight. It works, but is somewhat arbitrary.

Also add more paint overrides to Viewer.

Note that this only adds hairline handling for backup purposes. The code
in SkStrikeSpec::ShouldDrawAsPath which causes most harline glyphs to be
drawn directly from paths is not changed.

Change-Id: Icfadcd818d20b2557e4703c8e99d6d7dd0b4af70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368156
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-09 18:43:15 +00:00
Adlai Holler
863497b7fe Revert "SW mask gen: release scratch bitmap after upload"
This reverts commit 49e5b3a339.

Reason for revert: Going back to deferred proxies

Original change's description:
> SW mask gen: release scratch bitmap after upload
>
> This fixes a regression introduced in 366716, where we
> were retaining the scratch bitmap. Before that change we were
> destroying it after upload which is what we should do.
>
> Bug: skia:11288
> Change-Id: Ib567be037a2ff7595cd305a2ef3502d336795c46
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367880
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,adlai@google.com

Change-Id: I454622563ad899691fa55cd99853261e2ce66086
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11288
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368253
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-02-09 17:42:16 +00:00
Adlai Holler
7f7a5dfbb8 Revert "Remove unused ActualUse param from GrResourceAllocator"
This reverts commit b80fb0879b.

Reason for revert: Going back to deferred proxies

Original change's description:
> Remove unused ActualUse param from GrResourceAllocator
>
> This was here for deferred proxies, which are gone now.
>
> Bug: skia:11288
> Change-Id: Idc8a3aef7c3cce62d9397338a0c77d41435527a9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367881
> Commit-Queue: Adlai Holler <adlai@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Auto-Submit: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,adlai@google.com

Change-Id: I67c3fa9dd7bb886c956f7ccaf2cc928bfc269604
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11288
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368252
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-02-09 17:41:26 +00:00
John Stiles
47c0a74911 Replace clear_write/clone_with_ref_kind with Analysis::UpdateRefKind.
It turns out that walking an expression to update the refKind of its
embedded VariableReference is so useful that we had implemented it
twice. I will need to do it a third time in a followup CL.

Change-Id: Idd2794ea50f8c71725bb998ac8a625b36d076746
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368118
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-02-09 17:14:24 +00:00
Chris Dalton
ff4a53300e Calculate join tessellation values in the vertex shader
Each patch has one join and one set of stroke parameters, so the
vertex shader is the correct place to do it. This is also an important
cleanup that will allow us to create "dynamic" stroking parameters and
batch together strokes with different join types or stroke widths.

Bug: chromium:1172543
Bug: skia:10419
Change-Id: Icef0c20858fba6c18685006550dc75246710cd35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368043
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-02-09 16:54:01 +00:00
Brian Osman
030903a180 Ignore most modifiers in PipelineStageCodeGenerator
We ought to reject all of these in the parser, but even if they slip
through, we don't want to be emitting them for the backend. This leaves
'const' until we decide how to resolve the difference in semantics
between SkSL and GLSL.

Bug: skia:11301, skia:10837
Change-Id: I62730f6f971be04bcc3d367ceb7f211436b197c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368256
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-09 16:45:19 +00:00