Closed Bug 1543974 Opened 1 year ago Closed 1 year ago

Allow reusing render tasks within a frame

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: nical, Assigned: nical)

Details

(Whiteboard: [wr-q2][wr-april])

Attachments

(3 files)

There can currently be only one render task reading the input of another task in the render task tree.

We want to be able to have several tasks read the output of another task (effectively turning the render task tree into a render task graph), in order to perform some optimizations such as reusing intermediate work when an item has multiple shadows, and efficiently expressing SVG filter graphs.

Summary: Allow reusing of render tasks within a frame → Allow reusing render tasks within a frame
Type: defect → enhancement
Whiteboard: [wr-q2][wr-april]
Type: enhancement → task

Due to the render task ping-pong target allocation scheme, we need to ensure:

  • that tasks only read from tasks that are an odd number of passes apart,
  • that render task content is kept valid long enough for all of the dependent tasks.

The former is solved in this patch through blit tasks, the latter by marking tasks for saving as needed.

Screenshot of wrench with a stack of 4 shadows and the generated render task graph. Two shadows with identical radii (so they share all render tasks), one with a slightly higher radius that can reuse both down-scale passes but needs its own blur passes, and one with a smaller radius using a single downscale and a blit to resolve the allocation conflict.

Keywords: leave-open
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5cba75dd63c2
Deal with conflicting render task rect scheduling and allocation. r=kvark
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8f066e5c42c8
Add render task scheduling tests. r=gw
Status: NEW → RESOLVED
Closed: 1 year ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.