skia/skia/9c0bca4d3eb41ae3128336aea1a8e3020aac1040 [graphite] Tune search limit parameters for DrawListLayers
This adjusts three limits or settings:
1. Adds an inline allocation size to the DrawListLayer's arena of 256
bytes, which also becomes the default initial allocation (lower than
4096). Lowering this didn't hurt performance on my Mac, so should help
reduce memory churn.
2. Reduced the layer limit to 8 from 32; increasing the limit from 8
only marginally improved batching but started to hurt frame time. Given
the low limit, the heuristic for shortening the search switched to
halving, which also helped emergent behavior.
3. Switched the BindingList coarse limit to be dependent on stencil,
actually increasing from 32 to 64 when there was stencil (which helps
find more disjoint layers), or reducing to 16 when it was just a simple
shading draw.
Performance on M3 MBAir running --config grdawn_mtl --samples 50,
comparing BoundsManager to DrawListLayer:
* desk_motionmarkarcs.skp 3.65ms -> 3.27ms = -10%
* desk_motionmarksuitsclip.skp 4.25ms -> 4.08ms = -4%
* desk_motionmarksuits.skp 6.13ms -> 5.78ms = -5.7%
* desk_motionmarkleaves.skp 606us -> 546us = -10%
* desk_motionmarkpaths.skp 2.1ms -> 1.91ms = -9%
Repeated, but with storage buffers disabled, requiring more UBO
bindings:
* desk_motionmarkarcs.skp 3.81ms -> 3.55ms = -6.8%
* desk_motionmarksuitsclip.skp 5.41ms -> 5.28ms = -2.5%
* desk_motionmarksuits.skp 7.69ms -> 7.35ms = -4.4%
* desk_motionmarkleaves.skp 740us -> 764us = +3%
* desk_motionmarkpaths.skp 2.2ms -> 2.09ms = -5%
It may be worth following up to see if ordering by texture index to
improve binding compatibility would help, similar to how matching on
the partial pipeline index match shifted expensive batch breaks to
cheaper UBO/texture binds only.
Bug: 419535595
Change-Id: I68ed3d10ecde9950a3bdef26cebc1e1e9b5f3c61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1283284
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Nathan Sanchez <nathanasanchez@google.com>
3 files changed