Skip to content

metal-ca: PanVK's direct indexed draws on by default (swipes +15 %, Settings list +37 % on phone 2) - #407

Merged
claudiusthebot merged 1 commit into
mainfrom
perf/panvk-direct-default
Nov 23, 2026
Merged

claudiusthebot merged 1 commit into
mainfrom
perf/panvk-direct-default

Conversation

@claudiusthebot

@claudiusthebot claudiusthebot commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

PanVK records an indexed draw as a direct draw (no helper compute job before it) when STARBITE_PANVK_CPU_MINMAX=1 STARBITE_PANVK_CPU_DIRECT=1 are in the root's mtl2-env. Both patches have been in mk-panvk27.sh's series since 18 November, off by default, waiting for a phone run of the swipe frame rate (PERFORMANCE.md 9.1). This turns them on in steps.d/metal-ca/80-metal-ca.sh (METAL_CA_PANVK_DIRECT=0 leaves them out). A PanVK built without the two patches ignores the variables.

Measured on phone 2, 23 November

The owner's own root (iOS 27.2.1 24B156, StarbiteMetal 7b0a598c unchanged). One fresh boot each, the same kernel image (L6bt's kernel and line, plus sweetspeed with 16384, sweetfb_prof=1 sgu_prof=1), and the same console script: 30 s idle on the home screen, 20 page flicks 1.2 s apart, then Settings opened and its list flicked 16 times 1.5 s apart. Frames per second come from the framebuffer's 5 s windows that fall inside each phase, pauses included.

  • B0 = as the owner had it: PanVK cc241e55 (14 Nov), switches absent.
  • B1 = PanVK 22bd0c44 (the series with -cpu-minmax and -cpu-direct), both switches on.
B0 B1
idle (the Clock icon's 10 Hz) 10.0 fps, v/t chain 845 us 10.0 fps, v/t chain 490 us
home-screen flicks 25.9 fps (26.3 / 25.7 / 25.9) 29.8 fps (34.0 / 28.9 / 28.1 / 28.1)
vertex/tiler chain avg, fragment avg 815-829 us, 923-945 us 366-369 us, 962-969 us
GPU busy (10 s), tick asleep for the frame's GPU work, SwapEnd held 46-47 %, 12.7-13.8 ms, 6.3-6.9 ms 33-38 %, 7.9-10.4 ms, 2.3-2.9 ms
SwapEnd to shown 20-23 ms 17-20 ms
Settings list flicks 16.1 fps (16.6 / 15.7 / 16.0) 22.1 fps (22.9 / 21.4 / 22.1)
v/t chain, tick asleep, SwapEnd to shown 635-651 us, 35.6-37.2 ms, 43-45 ms 320 us, 21.4 ms, 30 ms

Checks in B1:

  • The home screen and Settings drew correctly in screenshots: icons, widgets, the glass dock and search field, the blurred bar.
  • No GPU fault and no FAILED line. backboardd did not exit.
  • Wi-Fi came up and touch worked.
  • The crashes were the same kinds as B0's (locationd, chronod), which were already there before this change.

Not measured: app open/close. The window stopped at the 78 C cut-off in both boots before reaching it.

The fragment chains did not move. They are what is left of a busy frame (PERFORMANCE.md 9).

Files: 80-metal-ca.sh (the two env lines and the switch), PERFORMANCE.md 9.1 (the table), and the header text of mesa26-panvk-cpu-direct.patch (no code change).

…CPU_MINMAX/CPU_DIRECT in mtl2-env)

Measured on phone 2 (23 Nov, owner's root, same kernel image and console script, fresh boots):
home-screen flicks 25.9 -> 29.8 fps, a Settings list 16.1 -> 22.1 fps, vertex/tiler chains
815-829 -> 366-369 us. METAL_CA_PANVK_DIRECT=0 leaves the two lines out. PERFORMANCE.md 9.1.
@claudiusthebot
claudiusthebot merged commit 6db574b into main Nov 23, 2026
3 checks passed
@claudiusthebot

Copy link
Copy Markdown
Collaborator Author

Caveat found after the merge, in later boots the same night: the home-screen swipe has two modes.

  • In 5 of 9 boots the widget renderer (WidgetRenderer_Default) ran at 6-7 % and SpringBoard at 33-38 % while flicking. These gave 25.9-30.1 fps.
  • In the other 4 it ran at 26-29 % and SpringBoard at 52-59 %. These gave 14.0-16.0 fps. This includes the plain end boot with this change in (14.5).

The +15 % swipe figure above compares two fast-mode boots (B0 and B1). A third fast-mode boot with the direct draws (sweetfb_cav=1) gave 30.1.

The Settings-list gain does not depend on the mode. Every direct-draw boot scrolled at 19.2-22.6 fps, against 16.1 for B0.

Details are in PERFORMANCE.md 9.2 (#408).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant