Closed Bug 1557833 Opened 6 years ago Closed 11 months ago

Optimize cs_clip_rectangle shader fetches

Categories

(Core :: Graphics: WebRender, enhancement)

66 Branch
enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: kvark, Unassigned)

References

(Blocks 1 open bug)

Details

This shader is used a lot, and we should focus on optimizing it more. Looking at it, I see at least two things that could be improved in terms of data fetches:

  1. the WR_FEATURE_FAST_PATH only needs 6 floats fetched for the clip: 4 for the rect, 1 for the mode, and 1 for the radius. What happens today is it fetches 40 floats (8 for ClipRect and then 8 for each corner...). I suggest us to put the radius into ClipRect::mode.y and avoid fetching the corners entirely, which would bring it down to 8 floats
  2. the non-fast path only appears to be using the outer_inner_radius fields of the ClipCorner, which means we could drop fetching the other 4 floats per corner.
Blocks: wr-perf
Severity: normal → S3

This shader will be getting removed once the quad mask work is complete.

Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.