Support reading the output of a render task in several render tasks

RESOLVED FIXED in Firefox 68

Status

()

enhancement
P3
normal
RESOLVED FIXED
4 months ago
3 months ago

People

(Reporter: nical, Assigned: nical)

Tracking

(Blocks 1 bug)

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

As far as I can tell currently when assigning render tasks to passes we expect that a render task will be encountered only once (in other words, the expectation is that each task is a child of at most one render task).

In order to optimize stacks of drop shadows we want to allow several blur tasks to read from the same down-scaled intermediate results. We'll also need this to implement the rest of the SVG filter specification.

Priority: -- → P3

I toyed with various render task graph strategies in this repository during the last few days in PTO.

The code is here https://github.com/nical/toy-render-graph/blob/master/src/lib.rs#L90

I didn't have internet access so there are pieces of webrender and euclid that ended up copy-pasted in there and the code is not cleaned up but it's generally rather simple and documented.

For render pass creation there is a simple "linear" strategy that corresponds to what webrender does (I think) and a more advanced strategy that generates the minimum amount of render passes.

For render target allocations the code currently implements webrender's current "ping-pong" strategy as well as a more "traditional" strategy that figures out the minimum amount of targets needed without adding blit tasks.

Allocating each task render target rect is done using WebRender's former guillotine allocator implementation. The graph builder computes the lifetime of each rect and allow aliasing (which webrender currently doesn't support).

I want to add a measurement of texture memory usage and CPU time and try it on a bunch of test cases but this already pretty simple to play with (just modify the test graph in lib.rs).

Blocks: 1521015
Assignee: nobody → nical.bugzilla

In addition, batch together render tasks for the cached render tasks.

Attachment #9051655 - Attachment description: Bug 1533735 - Allow several render tasks to read from the output of the same task. r=gw,kvark → Bug 1533735 - Refactor render task pass assignment in preparation for the render graph work. r=gw,kvark
Depends on: 1547290
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f210be8c82a0
Refactor render task pass assignment in preparation for the render graph work. r=gw,kvark
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.