Closed Bug 1811977 Opened 1 year ago Closed 1 year ago

Add a new tiled primitive rendering path to webrender

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: gw, Assigned: gw)

References

Details

Attachments

(1 file)

No description provided.

This patch adds most of the underlying infrastructure for a new
tiled (previously: segmented) rendering path to webrender. It is
initially used only by simple (non-masked) rectangles. Follow
up patches will extend this first to all rectangles and then
porting other primitives to use this new rendering path.

The new primitive is encoded in the command buffer structure,
which allows efficiently encoding arbitrary sets of commands
to be read by the batching code. The batching code for this
primitive is much simpler, and should be consistent and shared
when other primitives are ported to use this path.

Tiling is handled during the prepare pass per-primitive. It can
support edge AA tiles, different regions for clip-mask corners
(to be added in a follow up), and uniform tiling for the inner
section of the primitive (e.g. for tiled image masks).

It adds specific support for edge anti-aliasing to be considered
as part of the tiling configuration for a primitive. This both
improves performance of rotated but otherwise opaque primitives
and allows additional functionality we don't currently support
(such as applying AA along one edge of a 2d but subpixel aligned
primitive). Since SWGL provides native AA support, the patches
take account of that, and avoid the vertex shader work and extra
edge primitives when SWGL is enabled.

Follow up patches will:

  • Add clip-mask support to new rendering path
  • Port other primitives to new rendering path
  • Add SWGL shader fast-paths where profiling indicates it makes sense to
  • Remove old segment / mask rendering paths once no longer used

Other minor changes included as part of this patch:

  • Pack TransformPaletteId in 24 bits instead of 32, for better instance struct packing
  • Support prepare pass appending multiple command buffer instructions per primitive
Assignee: nobody → gwatson
Status: NEW → ASSIGNED
Pushed by gwatson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb476b6df396
Add a new tiled primitive rendering path to webrender r=gfx-reviewers,nical
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
Blocks: 1811978
Blocks: 1823579
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: