Граф коммитов

145 Коммитов

Автор SHA1 Сообщение Дата
Dzmitry Malyshau 5e158608bc Bug 1528674 - WR improve picture texture cache allocaton r=gw
The change contains a number of incremental improvements with the main goal of:
  - allocating exactly as many tile as required by the app
  - respecting the picture caching option

Differential Revision: https://phabricator.services.mozilla.com/D24740

--HG--
extra : moz-landing-system : lando
2019-03-26 21:18:09 +00:00
Glenn Watson b625730d0b Bug 1538626 - Support fast path for clip-out rectangles in WR. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D24666

--HG--
extra : moz-landing-system : lando
2019-03-25 08:35:31 +00:00
Glenn Watson 8452fc14bc Bug 1536732 - Add experimental pixel-local-storage render path to WR r=kvark
Add an experimental code path that makes use of the pixel local
storage extension available on many mobile GPUs.

This code path is currently disabled by default, as the support
is not complete for all primitives and blend modes. The initial
aim is to get feature parity with the existing renderer.

Once that's complete, we can take advantage of the (minimum)
12 bytes per pixel of high speed on-tile memory to store custom
data.

Clip masks are a good use case for this, since they map 1:1 with
the position of the fragment they are clipping. Using this for
clip masks allows us to handle clipping on mobile GPUs in a much
more efficient way - we can skip (a) separate render targets,
(b) target resolve (c) sample the mask texture during rendering.

Depends on D24123

Differential Revision: https://phabricator.services.mozilla.com/D24124

--HG--
extra : moz-landing-system : lando
2019-03-21 02:59:04 +00:00
Glenn Watson 9d856b1091 Bug 1535976 - Add a fast path for common rounded rect clips to WR. r=kvark
Most rounded rect clips in real content are (a) axis aligned and
(b) have uniform radii.

When these conditions are met, we can run a fast path for clip
mask generation that uses significantly fewer ALU shader ops.

This is not typically a bottleneck on desktop GPUs, but can have
a large performance impact on mobile GPUs (and perhaps low end
integrated GPUs).

The Mali shader analyzer reports the slow path for the rounded
rect clip shader to be 94 cycles per fragment, while the fast
path is 10 cycles.

Differential Revision: https://phabricator.services.mozilla.com/D23817

--HG--
extra : moz-landing-system : lando
2019-03-19 19:48:13 +00:00
Bogdan Tara d8ee73369c Backed out changeset 93c9a0e2da6e (bug 1527751) for wrench bustages CLOSED TREE 2019-03-19 07:41:50 +02:00
Alexis Beingessner e2857c55ed Bug 1527751 - properly apply transformed clips in brush shader. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D23905

--HG--
extra : moz-landing-system : lando
2019-03-18 21:05:56 +00:00
Bogdan Tara 84581c394f Backed out changeset 70440f88051f (bug 1535976) for /reftests/transform-3d/mask-layer* failures CLOSED TREE 2019-03-19 06:02:09 +02:00
Glenn Watson 7e08c517ab Bug 1535976 - Add a fast path for common rounded rect clips to WR. r=kvark
Most rounded rect clips in real content are (a) axis aligned and
(b) have uniform radii.

When these conditions are met, we can run a fast path for clip
mask generation that uses significantly fewer ALU shader ops.

This is not typically a bottleneck on desktop GPUs, but can have
a large performance impact on mobile GPUs (and perhaps low end
integrated GPUs).

The Mali shader analyzer reports the slow path for the rounded
rect clip shader to be 94 cycles per fragment, while the fast
path is 10 cycles.

Differential Revision: https://phabricator.services.mozilla.com/D23817

--HG--
extra : moz-landing-system : lando
2019-03-18 16:15:45 +00:00
Dzmitry Malyshau 7f7b9d9668 Bug 1527325 - Don't re-export contents of WR API units r=gw
The cleans up our WR use statements further, easying the merge conflicts.
Note: this PR is subject to instant rot, it is preferred to land quickly.

Differential Revision: https://phabricator.services.mozilla.com/D23373

--HG--
extra : moz-landing-system : lando
2019-03-14 01:44:05 +00:00
Gurzau Raul fc5efa3bc0 Backed out changeset 950174a8c708 (bug 1527325) for wrench failures on a CLOSED TREE. 2019-03-14 00:56:55 +02:00
Dzmitry Malyshau 5136f1e520 Bug 1527325 - Don't re-export contents of WR API units r=gw
The cleans up our WR use statements further, easying the merge conflicts.
Note: this PR is subject to instant rot, it is preferred to land quickly.

Differential Revision: https://phabricator.services.mozilla.com/D23373

--HG--
extra : moz-landing-system : lando
2019-03-13 19:30:56 +00:00
Dzmitry Malyshau 97423c7bca Bug 1519718 - Revert the mix-blend rewrite r=jrmuizel
https://phabricator.services.mozilla.com/D20608
Caused problems in Servo https://github.com/servo/servo/pull/22973 and MotionMark - https://bugzilla.mozilla.org/show_bug.cgi?id=1519718

Differential Revision: https://phabricator.services.mozilla.com/D23318

--HG--
rename : gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml
extra : moz-landing-system : lando
2019-03-13 14:50:46 +00:00
Dzmitry Malyshau b6ebaa6f8d Bug 1532174 - Roll back env_logger to 0.5 r=gw
needed to avoid duplicate dependencies

Differential Revision: https://phabricator.services.mozilla.com/D23072

--HG--
extra : moz-landing-system : lando
2019-03-12 02:54:05 +00:00
Dzmitry Malyshau 176b658e7a Bug 1532174 - Enable env_logger by default in Wrench r=gw
Env logger is useful for:
  1. seeing error! generated by the code (by default). Sometimes it can give us hints on what is wrong with the capture, or a test right away.
  2. seeing processed shader compile/link errors, which is very useful when changing them

Given that wrench is the main debugging tool at the moment, enabling the logging output by default should increase our productivity, at the cost of slightly longer build times.

Differential Revision: https://phabricator.services.mozilla.com/D23000

--HG--
extra : moz-landing-system : lando
2019-03-12 02:26:34 +00:00
Bogdan Tara 738b07a929 Merge inbound to mozilla-central. a=merge 2019-03-08 23:52:28 +02:00
Nicolas Silva fc4df4b5f7 Bug 1533282 - Restore the debugging options in wrench/script/headless.py. r=kvark,kats
Differential Revision: https://phabricator.services.mozilla.com/D22458

--HG--
extra : source : 84b7e225952a06c95cc415abf497e8295e644ad6
2019-03-08 11:15:32 +01:00
Kartikaya Gupta b4182026be Bug 1532284 - Build using android-28. r=gw
This is the SDK version we use to build other Android stuff in
mozilla-central. It's simpler if we build Wrench using the same
target since we can reuse the toolchains.

Depends on D22376

Differential Revision: https://phabricator.services.mozilla.com/D22377

--HG--
extra : moz-landing-system : lando
2019-03-07 17:34:50 +00:00
Kartikaya Gupta d1e8fe8a40 Bug 1532284 - Fix rustc compiler warnings when building wrench for Android. r=gw
Various variables are unused when building for Android.

Differential Revision: https://phabricator.services.mozilla.com/D22376

--HG--
extra : moz-landing-system : lando
2019-03-07 17:34:50 +00:00
Glenn Watson e920cc3f6a Bug 1533236 - Add a fast path to WR for common gradient types. r=kvark
The existing linear gradient shader is quite slow, especially
on very large gradients on integrated GPUs.

The vast majority of gradients in real content are very simple
(typically < 4 stops, no angle, no repeat). For these, we can
run a fast path to persist a small gradient in the texture cache
and draw the gradient via the image shader.

This is _much_ faster than the catch-all gradient shader, and also
results in better batching while drawing the main scene.

In future, we can expand the fast path to handle more cases, such
as angled gradients. For now, it takes a conservative approach,
but still seems to hit the fast path on most real content.

Differential Revision: https://phabricator.services.mozilla.com/D22445

--HG--
extra : moz-landing-system : lando
2019-03-07 21:20:40 +00:00
Ciure Andrei 5b0d4e70f1 Backed out changeset 664fd8f4cc02 (bug 1533282) for causing a wrench bustage CLOSED TREE 2019-03-07 19:17:34 +02:00
Nicolas Silva a9c6312e6e Bug 1533282 - Restore the debugging options in wrench/script/headless.py. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D22458

--HG--
extra : moz-landing-system : lando
2019-03-07 14:16:44 +00:00
Lee Salzman f4c05292a1 Bug 1527531 - calculate glyph subpixel positions using the precise font transform r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D22349

--HG--
extra : moz-landing-system : lando
2019-03-06 20:40:53 +00:00
Gurzau Raul 0208b45a04 Backed out changeset 6878f6294d68 (bug 1519718) for bustages on a CLOSED TREE. 2019-03-06 12:34:28 +02:00
Gurzau Raul 0e6a425f79 Backed out 2 changesets (bug 1519718) for performance regression (bug 1530611) on a CLOSED TREE.
Backed out changeset 9bae35dc1471 (bug 1519718)
Backed out changeset 640e731ed52e (bug 1519718)

--HG--
extra : rebase_source : ee2bc4503c84e709f7cd2265b4b6286960c20d4a
2019-03-06 11:47:53 +02:00
Glenn Watson 31fb2275a2 Bug 1531524 - Support running wrench on Android. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D21881

--HG--
extra : moz-landing-system : lando
2019-03-04 18:49:52 +00:00
Dzmitry Malyshau 79ad259c7c Bug 1531217 - Document origin rewrite and framebuffer coordinates r=gw,nical
The goal of this change was to simplify the semantics of our document placement and split the logical elements inside (display list) from the actual screen rectangle occupied by a document.
To achieve that, we introduce the framebuffer space for things Y-flipped on screen.
We fix the frame outputs, so that they get produced on the first frame without loopback from the frame building to scene building.

Differential Revision: https://phabricator.services.mozilla.com/D21641

--HG--
extra : moz-landing-system : lando
2019-03-01 17:16:59 +00:00
Csoregi Natalia b2672c85cf Backed out changeset 93f7dc3084a1 (bug 1531217) for wrench failures. CLOSED TREE 2019-03-01 18:48:30 +02:00
Dzmitry Malyshau a8d4f45a20 Bug 1531217 - Document origin rewrite and framebuffer coordinates r=gw,nical
The goal of this change was to simplify the semantics of our document placement and split the logical elements inside (display list) from the actual screen rectangle occupied by a document.
To achieve that, we introduce the framebuffer space for things Y-flipped on screen.
We fix the frame outputs, so that they get produced on the first frame without loopback from the frame building to scene building.

Differential Revision: https://phabricator.services.mozilla.com/D21641

--HG--
extra : moz-landing-system : lando
2019-03-01 14:25:36 +00:00
Kartikaya Gupta a23137f08f Bug 1531512 - Mark unused variables as unused for non-windows. r=kvark
rustc 1.33 is smart enough to detect and complain about this.

Differential Revision: https://phabricator.services.mozilla.com/D21601

--HG--
extra : moz-landing-system : lando
2019-03-01 04:04:46 +00:00
Glenn Watson fde9185d49 Bug 1530915 - Change external scroll offset to be a vector. r=emilio
Change the external scroll offset to be a vector, rather than a
point. This can also be updated gecko-side in future, but for
now is converted to a vector at the API boundary.

Also plumb through the external scroll offset so that it is stored
inside the ScrollFrameInfo in a spatial node. This will allow
modifying the transforms that the clip-scroll tree creates to
take into account the external scroll offset in future.

Differential Revision: https://phabricator.services.mozilla.com/D21319

--HG--
extra : moz-landing-system : lando
2019-02-27 05:26:50 +00:00
Timothy Nikkel c85a512b81 Bug 1505871. Add a wrench reftest. 2019-02-26 00:16:37 -06:00
Timothy Nikkel dad4e9d0b7 Bug 1505871. Implement yaml reader/writer for component transfer. r=jrmuizel 2019-02-26 00:16:36 -06:00
Timothy Nikkel 736fc91b3f Backed out changeset def812790f5c 2019-02-25 22:47:54 -06:00
Timothy Nikkel 24dc00068c Bug 1505871. Implement yaml reader/writer for component transfer. r=jrmuizel 2019-02-25 22:45:16 -06:00
Glenn Watson 1500229636 Bug 1530242 - Enable some picture caching invalidation tests in wrench. r=emilio
A number of small tweaks to enable the picture caching invalidation
tests. With this in place, we can start adding more test coverage
for various invalidation scenarios.

- Make the reference image render after the test images, so that dirty
  region tracking is more intuitive.
- Instead of replaying the same frame in wrench to ensure frames are
  caching, try to cache tiles every frame when testing mode is enabled.
- Add a basic invalidation test for a rectangle with color that changes
  each frame.
- Make the dirty region index implicit and rename dirty_region to dirty
  in reftest format.
- Fix an underflow error when moving to next frame in wrench.

Differential Revision: https://phabricator.services.mozilla.com/D20963

--HG--
extra : moz-landing-system : lando
2019-02-25 22:25:22 +00:00
Noemi Erli 7e23372938 Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG--
extra : rebase_source : de8796d5d7d7079af1b895a2f537371885f8cc6c
2019-02-26 00:09:40 +02:00
Kartikaya Gupta 280260b8d0 Bug 1519718 - Follow-up to bump the fuzz number slightly, so the test passes on AppVeyor too. rs=kvark 2019-02-25 09:04:23 -05:00
Dzmitry Malyshau 0bf19769e6 Bug 1519718 - WR mix-blend rewrite r=gw
This is a new implementation of mix-blend compositing that is meant to be more idiomatic to WR and efficient.

Previously, mix-blend mode was composed in the following way:
  1. parent stacking context was forced to isolate
  2. source picture is also isolated
  3. when rendering the isolated context, the framebuffer is read upon reaching the source. Both the readback and the source are placed in the RT cache.
  4. a mix-blend draw call is issued to read from those cache segments and blend on top of the backdrop

The new implementation works by using the picture cutting (intruduced for preserve-3D contexts earlier) and some bits of magic:
  1. backdrop stacking context is isolated with a special composition mode that prevents it from actually rendeing unless the suorce stacking context is invisible.
  2. source stacking context is isolated with mix-blend composition mode that has a pointer to the backdrop picture
  3. the instance of the backdrop picture is placed as a peer of the source picture (not a child)
  4. if the backdrop is invisible, the source is drawn as a simple blit
  5. otherwise, it's a draw call that reads from the isolated backdrop and source textures

Note the differences:
  - parent stacking context is not isolated, but backdrop is
  - no framebuffer readback is involved
  - the source and backdrop pictures are rendered in parallel in a pass, improving the batching
  - we don't blend onto the backdrop while reading from the backdrop copy at the same time
  - the depth of the render pass tree is reduced: previously the parent and the source were isolated, now the source and the backdrop, which are siblings

Differential Revision: https://phabricator.services.mozilla.com/D20608

--HG--
rename : gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml
rename : gfx/wr/wrench/reftests/blend/multiply-3.yaml => gfx/wr/wrench/reftests/blend/multiply-4.yaml
extra : moz-landing-system : lando
2019-02-25 00:17:22 +00:00
Razvan Maries 98aa3c3fde Backed out 2 changesets (bug 1519718) for causing perma fails on blend-gradient-background-color.html. a=backout
Backed out changeset 4f11ca736067 (bug 1519718)
Backed out changeset 4fefbf627bfc (bug 1519718)

--HG--
rename : gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml
2019-02-24 16:16:30 +02:00
Dzmitry Malyshau 9ddfc7834c Bug 1519718 - Remove accidental wrench log r=kats
Log was landed my mistake in https://phabricator.services.mozilla.com/D20608

Differential Revision: https://phabricator.services.mozilla.com/D20930

--HG--
extra : moz-landing-system : lando
2019-02-23 19:31:15 +00:00
Dzmitry Malyshau 575dd4463b Bug 1519718 - WR mix-blend rewrite r=gw
This is a new implementation of mix-blend compositing that is meant to be more idiomatic to WR and efficient.

Previously, mix-blend mode was composed in the following way:
  1. parent stacking context was forced to isolate
  2. source picture is also isolated
  3. when rendering the isolated context, the framebuffer is read upon reaching the source. Both the readback and the source are placed in the RT cache.
  4. a mix-blend draw call is issued to read from those cache segments and blend on top of the backdrop

The new implementation works by using the picture cutting (intruduced for preserve-3D contexts earlier) and some bits of magic:
  1. backdrop stacking context is isolated with a special composition mode that prevents it from actually rendeing unless the suorce stacking context is invisible.
  2. source stacking context is isolated with mix-blend composition mode that has a pointer to the backdrop picture
  3. the instance of the backdrop picture is placed as a peer of the source picture (not a child)
  4. if the backdrop is invisible, the source is drawn as a simple blit
  5. otherwise, it's a draw call that reads from the isolated backdrop and source textures

Note the differences:
  - parent stacking context is not isolated, but backdrop is
  - no framebuffer readback is involved
  - the source and backdrop pictures are rendered in parallel in a pass, improving the batching
  - we don't blend onto the backdrop while reading from the backdrop copy at the same time
  - the depth of the render pass tree is reduced: previously the parent and the source were isolated, now the source and the backdrop, which are siblings

Differential Revision: https://phabricator.services.mozilla.com/D20608

--HG--
rename : gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml
rename : gfx/wr/wrench/reftests/blend/multiply-3.yaml => gfx/wr/wrench/reftests/blend/multiply-4.yaml
extra : moz-landing-system : lando
2019-02-23 03:34:56 +00:00
Kartikaya Gupta b8ad25821d Bug 1499113 - Multiply transform scales into the blur radius for blur filters. r=kvark
Without this patch any enclosing scale transform between a blurred
picture and the nearest raster root was being ignored entirely for the
purposes of blur.

Also includes a couple of reftests to exercise this code.

Differential Revision: https://phabricator.services.mozilla.com/D20908

--HG--
extra : moz-landing-system : lando
2019-02-25 17:12:17 +00:00
Ciure Andrei 0e59b4108e Backed out changeset b5b2ecf454b0 (bug 1519718) for causing webrender-windows bustage CLOSED TREE
--HG--
rename : gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml
2019-02-23 01:13:38 +02:00
Dzmitry Malyshau d34bbe138b Bug 1519718 - WR mix-blend rewrite r=gw
This is a new implementation of mix-blend compositing that is meant to be more idiomatic to WR and efficient.

Previously, mix-blend mode was composed in the following way:
  1. parent stacking context was forced to isolate
  2. source picture is also isolated
  3. when rendering the isolated context, the framebuffer is read upon reaching the source. Both the readback and the source are placed in the RT cache.
  4. a mix-blend draw call is issued to read from those cache segments and blend on top of the backdrop

The new implementation works by using the picture cutting (intruduced for preserve-3D contexts earlier) and some bits of magic:
  1. backdrop stacking context is isolated with a special composition mode that prevents it from actually rendeing unless the suorce stacking context is invisible.
  2. source stacking context is isolated with mix-blend composition mode that has a pointer to the backdrop picture
  3. the instance of the backdrop picture is placed as a peer of the source picture (not a child)
  4. if the backdrop is invisible, the source is drawn as a simple blit
  5. otherwise, it's a draw call that reads from the isolated backdrop and source textures

Note the differences:
  - parent stacking context is not isolated, but backdrop is
  - no framebuffer readback is involved
  - the source and backdrop pictures are rendered in parallel in a pass, improving the batching
  - we don't blend onto the backdrop while reading from the backdrop copy at the same time
  - the depth of the render pass tree is reduced: previously the parent and the source were isolated, now the source and the backdrop, which are siblings

Differential Revision: https://phabricator.services.mozilla.com/D20608

--HG--
rename : gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml
rename : gfx/wr/wrench/reftests/blend/multiply-3.yaml => gfx/wr/wrench/reftests/blend/multiply-4.yaml
extra : moz-landing-system : lando
2019-02-22 22:22:06 +00:00
Kartikaya Gupta c366cdefb9 Bug 1528987 - Send the gecko scroll offsets for scrollframes to WR. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D20667

--HG--
extra : moz-landing-system : lando
2019-02-21 21:06:25 +00:00
Glenn Watson 9314a751d7 Bug 1491929 - Text is rasterized at the wrong resolution. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D20276

--HG--
extra : moz-landing-system : lando
2019-02-19 20:25:40 +00:00
Glenn Watson 702c53489e Bug 1528157 - Optimize GPU time for clip mask generation. r=kvark
On integrated GPUs, we are typically completely bound by memory
bandwidth and the number of pixels that get written / blended.

On real world pages, it's often the case that we end up with
clip tasks that are long in one dimension but not the other, due
to box-shadow edges, clip mask segments etc. When this occurs,
the logic that tries to get a small 'used_rect' to clear targets
to fails, since the union of those ends up being a very large
rect that covers (most of) the surface. This can cost a lot of
GPU time on some integrated chipsets.

Instead, it appears to be much faster to issue multiple clears,
one for each clip mask region, which is typically < 10% of the
surface we were clearing previously.

However, we can also restore an old optimization we used to have
which means we can skip clears altogether in the common case. The
first mask in a clip task will write to all the pixels in the mask,
so we can draw that with blending disabled (also a significant win
on integrated GPUs) and skip the clear in these cases. With this
functionality in place, the multiplicative blend mode is only
enabled for any clips other than the first in a mask (this is
quite a rare case - most clip tasks end up with a single mask).

On low end GPUs driving a 4k screen, I've measured GPU wins of up
to 5 ms/frame on some real world pages with this change.

Differential Revision: https://phabricator.services.mozilla.com/D19893

--HG--
extra : moz-landing-system : lando
2019-02-19 20:52:27 +00:00
Kartikaya Gupta ca0bceb4a8 Bug 1516568 - Fuzz a couple of mac reftests. r=gw
For some reason running these via cross-compiled wrench in Mozilla
automation produces a few pixels difference.

Differential Revision: https://phabricator.services.mozilla.com/D19368

--HG--
extra : source : f06721b552a819e4d2456f1c31d62c782d9a42cb
2019-02-15 01:32:10 +00:00
Kartikaya Gupta c5e6c813f1 Bug 1516568 - Update WR mac CI scripts to allow cross-compiling. r=kvark
This introduces some env vars to allow running cross-compiled
binaries instead of running things on the builder. Additionally
the `cargo test --features "ipc"` check is modified to be `check`
instead since there are no actual tests being run by that command.
The only thing we lose is a rustdoc example check but we are
checking that on Linux anyway so doing it for Mac is redundant.

Differential Revision: https://phabricator.services.mozilla.com/D19367

--HG--
extra : source : ee403c79877e028c58fa9091dd360fe50a80af37
2019-02-15 01:32:06 +00:00
Dorel Luca b73b2c4f67 Backed out 7 changesets (bug 1516568) for Docker and Toolchain failures. CLOSED TREE
Backed out changeset 79120d13e713 (bug 1516568)
Backed out changeset 028c0ed368b8 (bug 1516568)
Backed out changeset f06721b552a8 (bug 1516568)
Backed out changeset ee403c79877e (bug 1516568)
Backed out changeset 8990eef6c31e (bug 1516568)
Backed out changeset f6413e576a21 (bug 1516568)
Backed out changeset e9f887f489e5 (bug 1516568)
2019-02-15 05:16:55 +02:00