owned this note
owned this note
Published
Linked with GitHub
~~##### # GFX 2019 work week
#####
Interning positions?
##### (gw, kvark)
#####
##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)
#####
##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem [best](https://)(TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)
##### ##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)
#####
##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)
#####
##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)
#####
##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)
#####
##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)
#####
##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
- [ ] > ##### - however, hit testing still is a problem (TODO: clarify)``
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)
> #####
##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)
#####
##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify) just clarify
> []because its funny
> right ?
| Column 1 | Column 2 | Column 3 |
| -------- | -------- | -------- |
| Text | Text | Text |
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)##### - we intern sizes but not positions of clips and primitives
##### - gecko bakes the scroll offsets
##### - new API now allows us to ask for the scroll offsets and “unbake” them
##### - however, hit testing still is a problem (TODO: clarify)
##### - need `getrelativetransform` to be used consistently
##### - blocked on flattening rework (TODO: resolve)
Mix-blend rollback
#####
##### TODO
#####
#####
CSS Shooter perf
#####
##### TODO
#####
#####
Render task graph
##### (nical, gw, kvark)
#####
##### Problem 1: a task is dependent on my multiple other tasks
##### Case: multiple drop shadows on the same text item
##### Opportunity: only downscale the text once, use for all shadow tasks
#####
##### Note: render task cache can't be used, since it doesn't handle dependencies well (scheduling issue).
##### - solution: schedule the RT cache as late as possible
##### - when dependencies are in the texture cache, we'd need to render in a pass and blit back to the texture cache
#####
##### Concern: render task rect rect allocation assumes that the source is in the previous pass.
##### - solution: blit contents of a task across passes
##### - schedule as late as possible
##### - retain some of the render task slices/rects as opposed to clearing
#####
##### Blits are expensive:
##### - bounds are not tight
##### - the perf on Intel scales with the number of pixels we touch
#####
##### TODO: check ARM/Mali for when the tiles are resolved:
##### - does it happen if the tile is unchanged?
##### - what if it was just cleared?
#####
##### Motivation:
##### 1. reduce redundant shadow tasks
##### 2. remove "mark for saving"
##### 3. SVG filters are expressed as graphs
#####
##### Q: retain across frames?
##### A: currently, not retaining any shadow tasks
#####
##### Q: debugging tools for RT graph resolver?
##### A: fun thing to write, given that the thing is fairly standalone
##### N: need tooling to find out the best scheduling off-line, compare with the run-time by the number of pixels
#####
##### Current "best" strategy:
##### - ping-pong as current WR
##### - schedule late
#####
##### Q: incremental deployment of the new alloctor?
##### 1. first, integrate with existing behavior
##### 2. enable for shadows and other things
##### 3. play with strategies
#####
##### Future:
##### 1. Since texture array, sub-manage slices. Try work with slices, not rects.
##### 2. Render pass as the whole render target, select the slice in VS.
##### 3. Try identifying the 1:1 pass work, use sub-passes.
##### - tile cache memory limits? know how many mask slices are there
##### - can provide the whole frame as one giant render pass
#####
##### Q: can we exploit the axises and auto-rotate things?
##### - would be good!
##### - segmentation solves the problem to some extent
##### - could also exploit the symmetry
#####
##### Rounded corners optimizations:
##### - only render the corners into the mask
##### - exploit the symmetry
##### - more precise bounding/geometry to reduce fill rate
##### - can't apply the local clip rect in this case!
##### - quad tree subdivision (or a regular grid) - still draw rects
##### - can't multiply the clip mask (TODO: discuss)
#####
# Current PLS "optimization"
##### (gw, kvark, Gankro)
#####
##### TODO
#####
Flattening semantics
#####
##### TODO
#####
WebGPU integration
##### (kats, kvark)
#####
##### Process of vendoring wgpu-rs:
##### - move into the tree
##### - improve the remote layer
##### - establish scripts to/from GitHub
#####
##### Gecko will have 2 implementations as well, in the shape of different structs with the same virtual interface: local and remote. Differences are:
##### 1. `Client` parameter in all functions of the remote layer
##### 2. Swapchain integration (unknown on Gecko side)
##### 3. Pass dependencies collection in the remote layer
#####
##### Q: how do we reduce the JS calls in client apps?
#####
##### Moving into Gecko:
##### 1. copy into tree as "gfx/webgpu"
##### 2. connect it into libgkrust's [Cargo.toml](https://searchfox.org/mozilla-central/source/toolkit/library/rust/shared/Cargo.toml) and [lib.rs](https://searchfox.org/mozilla-central/source/toolkit/library/rust/shared/lib.rs)
##### 3. Run `./mach vendor rust`, check complains about licensing. This will add dependencies to thirdparty/rust, make sure it looks sane
##### 4. add build option "--enable-webgpu" similar to WR [here](https://searchfox.org/mozilla-central/rev/201450283cddc9e409cec707acb65ba6cf6037b1/toolkit/moz.configure#681-711). make the libgkrust integration stuff from step 2 behind a feature flag controlled by the build option
##### 5. To add a taskcluster job, copy and modify the existing webrender standalone jobs such as [this one](https://searchfox.org/mozilla-central/rev/201450283cddc9e409cec707acb65ba6cf6037b1/taskcluster/ci/webrender/kind.yml#1-26,44-67) - copy it into a new `taskcluster/ci/webgpu/kind.yml` file. You won't need the wrench-deps stuff, just run `cargo build` in the gfx/webgpu folder
#####
#####
WebRender architecture overview
##### (gw)
#####
##### Display Lists:
##### 1. - Items
##### - text
##### - box shadowssssss
##### - image
##### - Stacking contexts
##### - filtersś
##### - Clip chains
##### - Reference frames
#####
##### Scene ("model"):
##### - picture tree
##### 1. - spatial tree
##### 1. - clip chains
##### 1.
##### 1. Q: "scene" term vs WR capturing
##### 1. Q: internation? (see picture caching)
##### 1. Q: tile caching?
#####
##### | Column 1 | Column 2 | Column 3 |
##### | -------- | -------- | -------- |
##### | Text | Text | Text |
#####
#####
##### can be scrolled around
#####
##### Frame ("view"):
##### - update spatial tree
##### - update picture tree
##### - update visibility
##### - update primitives
##### - generate render tasks
##### - assign passes
##### - batch
#####
##### Submit:
##### - apply resource updates
##### - for each pass
##### - for each layer
##### - bind resources
##### - draw
#####
# Picture caching
#####
##### Q: stuff moved but not marked as changed by the debug overlay?
##### A: could be fixed-position element that isn't cached, drawn on top
#####
##### Interning key:
##### 1. item itself
##### 2. clipping
##### 3. transform
##### 4. animated properties (e.g. opacity)
#####
##### Picture = (prim uuid, uuid, uuid, ..) but
##### Tiles 1024x256. Identifying the dirty regions and updating them with a scissor rect.
#####
##### Q: what happens with complex regions?
##### A: draw the whole thing
##### - should set the Z on tiles to reject the pixels over the valid tiles (TODO: verify)
##### - blog-post-like pages are still the bad case
#####
##### Q: tile coordinate space?
##### A: world. If stuff is scrolled, the positions are adjusted, so we get the same world results.
#####
##### Q: how does the valid content gets into the new frame
##### A: copied through the texture cache
##### ~~~~**