Placed image creation in streaming: Vulkan creation is ~0.03 ms/image, first fill is the larger half #226

Closed
opened 2026-12-02 15:12:47 +00:00 by github-bot · 1 comment
Owner

@⁠TheRifai on GitHub · 2026-12-02 15:10 UTC · original

Finding (TASKS "Placed image creation in the streaming phase", line 182)

Seen on: main 963df8e, RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X 3840x2160, house save rt3, 85 s warm-store run, VKB_LAT=1 + VKB_FREC_ARM=30,34. The gpuprof-armed frames are serialised, so treat these as upper bounds.

The existing img:/be: latency labels already split this path. Over 233 steady-state imgbatch windows (fewer than 20k slots, excluding world-start setup):

Label mean p50 max
be: of which placed image creation (write_view) 1.096 ms 0.37 ms 12.36 ms
img: upload (provider, fill prepare, record) — 0.37 ms in the sample window below —
img: vkCreateImage + memory (arena or own) — 0.03 ms / 22 images in the sample window —
imgbatch (whole slot pass) 2.262 ms 1.12 ms 21.97 ms

One sample window with 22 new images: imgbatch 0.99 ms, of which placed image creation 0.42 ms, upload/fill prepare 0.37 ms, vkCreateImage + memory 0.03 ms, vkCreateImage 0.01 ms.

So the Vulkan creation calls themselves are a small part; most of the cost in this path is the first upload/detile/fill. That supports the merge-shape half of the task (reuse images of the same description — open PR #190) and suggests the other half (create the rest on a helper thread ahead of Execute) has a small ceiling unless it also moves the first fill. A/B evidence for the fill lever is negative locally: VKB_FILL_PARTIAL=0 removed ~1.2 ms of fill-prepare work per slow frame but made runs slightly slower (see /home/shlong/Documents/VKtory-capture/partial-ab-*/).

No code change from me; PR #190 already covers the reuse part. Evidence: /home/shlong/Documents/VKtory-capture/house-city-gpuprof2/lat.txt.

Next

Decide whether the helper-thread half is worth pursuing given the ~0.03 ms/image creation ceiling; if yes, name the first-fill work it should move too.

**@⁠TheRifai** on GitHub · 2026-12-02 15:10 UTC · [original](https://github.com/vktory6/VKtory/issues/226) ## Finding (TASKS "Placed image creation in the streaming phase", line 182) **Seen on:** main `963df8e`, RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X 3840x2160, house save `rt3`, 85 s warm-store run, `VKB_LAT=1` + `VKB_FREC_ARM=30,34`. The gpuprof-armed frames are serialised, so treat these as upper bounds. The existing `img:`/`be:` latency labels already split this path. Over 233 steady-state `imgbatch` windows (fewer than 20k slots, excluding world-start setup): | Label | mean | p50 | max | |---|---:|---:|---:| | `be: of which placed image creation (write_view)` | 1.096 ms | 0.37 ms | 12.36 ms | | `img: upload (provider, fill prepare, record)` | — | 0.37 ms in the sample window below | — | | `img: vkCreateImage + memory (arena or own)` | — | 0.03 ms / 22 images in the sample window | — | | `imgbatch` (whole slot pass) | 2.262 ms | 1.12 ms | 21.97 ms | One sample window with 22 new images: `imgbatch 0.99 ms`, of which placed image creation 0.42 ms, upload/fill prepare 0.37 ms, `vkCreateImage + memory` 0.03 ms, `vkCreateImage` 0.01 ms. So the Vulkan creation calls themselves are a small part; most of the cost in this path is the first upload/detile/fill. That supports the merge-shape half of the task (reuse images of the same description — open PR #190) and suggests the other half (create the rest on a helper thread ahead of Execute) has a small ceiling unless it also moves the first fill. A/B evidence for the fill lever is negative locally: `VKB_FILL_PARTIAL=0` removed ~1.2 ms of fill-prepare work per slow frame but made runs slightly slower (see `/home/shlong/Documents/VKtory-capture/partial-ab-*/`). No code change from me; PR #190 already covers the reuse part. Evidence: `/home/shlong/Documents/VKtory-capture/house-city-gpuprof2/lat.txt`. ## Next Decide whether the helper-thread half is worth pursuing given the ~0.03 ms/image creation ceiling; if yes, name the first-fill work it should move too.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 15:12:48 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-02 16:13 UTC · original

Thanks, the finding and its numbers are now in the matching TASKS item, so the next person starts from them: github.com/vktory6/VKtory@7c1ba48. Closing here, the task tracks the work.

**@⁠vktory6** on GitHub · 2026-12-02 16:13 UTC · [original](https://github.com/vktory6/VKtory/issues/226#issuecomment-7351628004) Thanks, the finding and its numbers are now in the matching TASKS item, so the next person starts from them: https://github.com/vktory6/VKtory/commit/7c1ba48. Closing here, the task tracks the work.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/vktory6--VKtory#226
No description provided.