Commit Graph

498 Commits

Author SHA1 Message Date
Dzmitry Malyshau
eef888097b Bug 1538711 - Fix tile cache clip chain in WR r=gw
Differential Revision: https://phabricator.services.mozilla.com/D25667

--HG--
extra : moz-landing-system : lando
2019-04-03 16:28:19 +00:00
Andrew Osmond
a26277d8ff Bug 1541059 - Add support for KHR_debug to WebRender for debug markers. r=kvark
Today we already support EXT_debug_marker for debug markers in
WebRender. This is useful to categorize GL API calls in tools such as
APITrace and RenderDoc. However not all drivers indicate support for
said extension, but instead support KHR_debug. This patch makes us
support both methods, preferring KHR_debug.

Differential Revision: https://phabricator.services.mozilla.com/D25787
2019-04-02 12:31:03 -04:00
Emilio Cobos Álvarez
a77e5e1ffc Bug 1520953 - Use GL_ANGLE_provoking_vertex extension if available. r=jgilbert
You tell me if this is right, I have no Windows build available to test :)

Depends on D25602

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

--HG--
extra : moz-landing-system : lando
2019-04-01 16:06:20 +00:00
Emilio Cobos Álvarez
63d22618c3 Bug 1520953 - Update gleam. r=kats,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D25602

--HG--
extra : moz-landing-system : lando
2019-04-01 17:54:08 +00:00
Barret Rennie
6e284e1063 Bug 1444434 - Free the Gecko profiler screenshots structures in the WebRender renderer when profiling stops r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23964

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:49 +00:00
Barret Rennie
6131c4dbab Bug 1444434 - Add C bindings to the Renderer::get_screenshot_async and Renderer::map_and_recycle_screenshot APIs r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23962

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:32 +00:00
Barret Rennie
03468158ba Bug 1444434 - Add infrastructure for reading back screenshots for the Gecko profiler to WebRender r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23961

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:25 +00:00
Barret Rennie
98ab12e0e7 Bug 1444434 - Capture screenshots for the Gecko profiler in WebRender r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23960

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:15 +00:00
Barret Rennie
a3b16ea535 Bug 1444434 - Optionally create PBOs with a backing buffer and store that size with the PBO r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23959

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:08 +00:00
Dzmitry Malyshau
44c0bfd046 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-28 03:02:45 +00:00
Glenn Watson
9b399ba2a8 Bug 1539048 - Support segment rendering for pictures in WR. r=kvark
On some low end GPUs, clip mask rendering can be a significant
GPU cost. One way to reduce this is to support segment rendering
on more primitive types, to reduce the size of clip masks.

This patch adds support for pictures that have clip masks
to take part in segment rendering. This can significantly
reduce the number of fragments that must be drawn into a clip
mask for off-screen picture surfaces.

In future, WR can take advantage of segment rendering to use
clip mask shaders that handle only a single corner at a time.
This will be a further significant performance win to clip mask
render time.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 21:25:31 +00:00
Cosmin Sabou
d3aa170d5a Backed out changeset bbb6a31ebf07 (bug 1528674) for webrender crashtests and reftests failures.
--HG--
extra : rebase_source : 083b18e419d18de6a13d7a22e482f995adee1b00
2019-03-27 02:15:39 +02:00
Coroiu Cristina
c1e4fdf4a6 Backed out 6 changesets (bug 1444434) for build bustages on a CLOSED TREE
Backed out changeset 13c0d857bf3c (bug 1444434)
Backed out changeset d2c85db549ea (bug 1444434)
Backed out changeset 543708a1f683 (bug 1444434)
Backed out changeset af008ed0a5c2 (bug 1444434)
Backed out changeset ec2a81eea388 (bug 1444434)
Backed out changeset 0bcf6edc8656 (bug 1444434)
2019-03-26 23:43:17 +02:00
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
Barret Rennie
b8fcd696e6 Bug 1444434 - Free the Gecko profiler screenshots structures in the WebRender renderer when profiling stops r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23964

--HG--
extra : moz-landing-system : lando
2019-03-21 19:30:34 +00:00
Barret Rennie
02072d330d Bug 1444434 - Add C bindings to the Renderer::get_screenshot_async and Renderer::map_and_recycle_screenshot APIs r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23962

--HG--
extra : moz-landing-system : lando
2019-03-21 19:09:22 +00:00
Barret Rennie
84219e9643 Bug 1444434 - Add infrastructure for reading back screenshots for the Gecko profiler to WebRender r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23961

--HG--
extra : moz-landing-system : lando
2019-03-21 19:16:12 +00:00
Barret Rennie
b8cb6e3e8a Bug 1444434 - Capture screenshots for the Gecko profiler in WebRender r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23960

--HG--
extra : moz-landing-system : lando
2019-03-21 20:13:58 +00:00
Barret Rennie
b73731e1e0 Bug 1444434 - Optionally create PBOs with a backing buffer and store that size with the PBO r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23959

--HG--
extra : moz-landing-system : lando
2019-03-21 17:07:24 +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
Doug Thayer
c734d845d0 Bug 1441308 - Map document layers to z ranges r=gw
As discussed in IRC. AFAICT the ORTHO_NEAR|FAR_PLANE should match
up with the ranges of valid ZBufferIds, but please double-check
me.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 18:28:51 +00:00
Doug Thayer
09c427ac55 Bug 1441308 - Correct Renderer issues with multiple documents r=gw
This corrects A) An issue encountered with our strategy for skipping
the end_pass call for all but an offscreen render target. See the
comment above the end_pass call for details, and B) An issue with
depth clearing where we do not clear the whole rect if there are
multiple non-intersecting documents.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 18:28:46 +00:00
Doug Thayer
45b7708846 Bug 1441308 - Rename ForEach trait to AsyncForEach r=lsalzman
Just a little rename for clarity - I ended up scratching my head at
something for a little more time than I should have because I assumed
this was synchronous without looking at the implementation.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 18:28:38 +00:00
Doug Thayer
b172543596 Bug 1441308 - Core renderroot splitting changes r=kats,sotaro
This is a large patch that contains all of the core changes for
renderroot splitting.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 18:28:42 +00:00
Ciure Andrei
3de853018a Backed out 7 changesets (bug 1441308)for causing webrender build bustages CLOSED TREE
Backed out changeset 1764701d11d1 (bug 1441308)
Backed out changeset 32f7793dfd1a (bug 1441308)
Backed out changeset d8b4d6ec9b40 (bug 1441308)
Backed out changeset e2f83e4816dd (bug 1441308)
Backed out changeset baee8ada680f (bug 1441308)
Backed out changeset c09a51622e98 (bug 1441308)
Backed out changeset 737807563dd5 (bug 1441308)
2019-03-22 10:52:44 +02:00
Doug Thayer
472a9344d2 Bug 1441308 - Map document layers to z ranges r=gw
As discussed in IRC. AFAICT the ORTHO_NEAR|FAR_PLANE should match
up with the ranges of valid ZBufferIds, but please double-check
me.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 23:15:23 +00:00
Doug Thayer
fc4d50c197 Bug 1441308 - Correct Renderer issues with multiple documents r=gw
This corrects A) An issue encountered with our strategy for skipping
the end_pass call for all but an offscreen render target. See the
comment above the end_pass call for details, and B) An issue with
depth clearing where we do not clear the whole rect if there are
multiple non-intersecting documents.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 03:15:18 +00:00
Doug Thayer
32a7e500dd Bug 1441308 - Rename ForEach trait to AsyncForEach r=lsalzman
Just a little rename for clarity - I ended up scratching my head at
something for a little more time than I should have because I assumed
this was synchronous without looking at the implementation.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 03:15:16 +00:00
Doug Thayer
5b3a0454a4 Bug 1441308 - Core renderroot splitting changes r=kats,sotaro
This is a large patch that contains all of the core changes for
renderroot splitting.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 03:15:14 +00:00
Glenn Watson
557728d4ad Bug 1537668 - Refactor how clip task indices are passed to shaders. r=kvark
This patch shouldn't have any functional effect. It's motivated by
some changes needed to implement clip masks in pixel local storage,
but these are also general improvements that stand alone. Specifically:

 - Remove clip_task_index from the global PrimitiveHeader struct.
   In most cases, the clip task is supplied in the BrushInstance
   structure, so it makes no sense to have this as a common field,
   where it is generally unused. Instead, there is now an extra
   'user data' field available in the PrimitiveHeader. Non-brush
   shaders (text_run and split_composite) use that extra field to
   store the clip task address, while the brush shaders gain an extra
   (currently unused) user data field.
 - In turn, this means there is no need to unconditionally try
   and retrieve the first clip task address for a primitive
   during batching. This was previously used to initialize the
   PrimitiveHeader structure.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 14:37:57 +00:00
Kartikaya Gupta
f6575a29b2 Bug 1537577 - Move doc comment to fix new warning in rustc 1.35.0-nightly. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D24359

--HG--
extra : moz-landing-system : lando
2019-03-21 14:32:09 +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
Barret Rennie
36cd17958e Bug 1444434 - Bump webrender and webrender_bindings gleam dependency to 0.6.14 r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23958

--HG--
extra : moz-landing-system : lando
2019-03-20 19:52:53 +00:00
Dzmitry Malyshau
7afa68dc61 Bug 1536085 - Update plane-split to 0.13.8 r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D24095

--HG--
extra : moz-landing-system : lando
2019-03-19 21:00:08 +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
Jamie Nicol
083b51840d Bug 1511433 - Ensure address variables in fragment shaders are highp precision. r=gw
In GLES 3 GLSL, the default precision for ints is highp (32 bit) in
vertex shaders, but only mediump (16 bit) in fragment shaders.

To render linear and radial gradients the fragment shader must fetch
the gradient stops from the gpu cache, using an address variable. This
variable is a 16 bit int, so if the stops data is located at
too high an address (row 32 or greater) then this value will have
overflown and we fetch from the wrong location. This was resulting in
garbage being drawn instead of the correct gradients.

To fix this, any address used in a fragment shader must be marked as
highp. This includes the varying input which supplies the address, and
the arguments to any functions used for the fetch.

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

--HG--
extra : moz-landing-system : lando
2019-03-17 20:54:29 +00:00
Glenn Watson
a15a5c4425 Bug 1535540 - Remove the identity transform condition while checking redundant stacking contexts. r=emilio
The only time that the ancestor spatial node index is read is
during push_stacking_context. This means that even if it was
used as an ancestor for a 3d context, we can safely collapse
it in to the parent stacking context during flattening, if it
is otherwise redundant.

This is a partial fix for picture caching heuristics failing
with the display list produced on mobile devices.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 03:08:26 +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
Glenn Watson
59cda29424 Bug 1534885 - Change clip mask rendering to not rely on render task data. r=kvark
As a general principle, we're trying to remove most usage of the
render task data that gets stored in a texture (bind_frame_data
is slow on many platforms, and it's somewhat inflexible with the
amount of data that can be provided).

This also lays some foundations for possibly drawing clip masks
with alternative techniques on mobile / tiled GPU architectures,
where we may not need / want a render task for clip masks.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 19:28:36 +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
sotaro
c046c7a430 Bug 1531294 - Fix RecvEmptyTransaction() as to handle WebRenderTextureHostWrapper usage case
By Bug 1526213, WebRenderBridgeParent::RecvEmptyTransaction() does not handle a case that resource update is handled by WebRenderTextureHostWrapper. In this case, txn.IsResourceUpdatesEmpty() became true and the function thought there was no resource update and the function returned DidComposite soon to client side. Then it caused a heavy over production of SharedSurface_ANGLEShareHandle if GPU is not powerful.

Differential Revision: https://phabricator.services.mozilla.com/D22454
2019-03-12 21:48:34 +09:00
Bogdan Tara
8abdafbf10 Merge inbound to mozilla-central. a=merge 2019-03-12 11:51:39 +02:00
Timothy Nikkel
6061184923 Bug 1532245. Factor out component transfer code to a function in brush_blend shader for webreder. r=gw
Some phones can't compile the shader as is: "ERROR: 0:1448: '' : No default label can be nested inside other control flow nested within their corresponding switch"

https://github.com/servo/webrender/wiki/Driver-issues#bug-1532245---switch-statement-inside-control-flow-inside-switch-statement-fails-to-compile-on-some-android-phones

Differential Revision: https://phabricator.services.mozilla.com/D22853
2019-03-11 21:34:30 -05:00
Oana Pop Rus
69cfd60db1 Backed out changeset c32dcf4e6f92 (bug 1532245) for wrench failures 2019-03-12 00:29:04 +02:00