Tiled-texture cost model: copy/watch side measured, per-sample detile cost still missing #227

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

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

Finding (TASKS "Tiled textures without a copy (idea, to measure first)", line 256)

Seen on: main 963df8e, RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X 3840x2160, house save rt3, warm store, 85 s with VKB_LAT=1 + VKB_FREC_ARM=30,34 (city view; gpuprof frames serialised, so times are upper bounds).

The measurable half of the cost model, from /home/shlong/Documents/VKtory-capture/house-city-gpuprof2/lat.txt (142 frames ≥50 ms):

Label total ms ms/slow frame
tex: fill prepare 177.9 1.25
tex: detile runs (cached by shape) 148.9 1.05
tex: source sweep 116.9 0.66

Page-guard CPU cost on the same hardware (100 s house walk, /home/shlong/Documents/VKtory-capture/isview-run/): is_view 830 calls/s median, 80.6 ms/s median (~2.7 ms/frame at 30 fps), ~100 µs per call. Those guards are how texture writes are watched, so they belong in the "watch CPU ms" side of the model.

The missing half is the per-sample cost of detiling in the shader at each read. It cannot be read from the local RGP capture: RGP 2.7.1 does not decode instruction timing for these GFX12 shaders (issue #9), and no pass has a measured per-sample detile time. Without that number the trade (copy + watch vs address math at every sample) cannot be decided, so no code change from me.

Next

Get a per-sample detile cost on one heavy pass (either a shader-side counter in a temporary probe, or RGP instruction timing once a viewer/toolchain decodes it), then compare it against ~1-2 ms/frame of fill/detile plus ~2.7 ms/frame of guard queries.

**@⁠TheRifai** on GitHub · 2026-12-02 15:11 UTC · [original](https://github.com/vktory6/VKtory/issues/227) ## Finding (TASKS "Tiled textures without a copy (idea, to measure first)", line 256) **Seen on:** main `963df8e`, RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X 3840x2160, house save `rt3`, warm store, 85 s with `VKB_LAT=1` + `VKB_FREC_ARM=30,34` (city view; gpuprof frames serialised, so times are upper bounds). The measurable half of the cost model, from `/home/shlong/Documents/VKtory-capture/house-city-gpuprof2/lat.txt` (142 frames ≥50 ms): | Label | total ms | ms/slow frame | |---|---:|---:| | `tex: fill prepare` | 177.9 | 1.25 | | `tex: detile runs (cached by shape)` | 148.9 | 1.05 | | `tex: source sweep` | 116.9 | 0.66 | Page-guard CPU cost on the same hardware (100 s house walk, `/home/shlong/Documents/VKtory-capture/isview-run/`): `is_view` 830 calls/s median, 80.6 ms/s median (~2.7 ms/frame at 30 fps), ~100 µs per call. Those guards are how texture writes are watched, so they belong in the "watch CPU ms" side of the model. The missing half is the per-sample cost of detiling in the shader at each read. It cannot be read from the local RGP capture: RGP 2.7.1 does not decode instruction timing for these GFX12 shaders (issue #9), and no pass has a measured per-sample detile time. Without that number the trade (copy + watch vs address math at every sample) cannot be decided, so no code change from me. ## Next Get a per-sample detile cost on one heavy pass (either a shader-side counter in a temporary probe, or RGP instruction timing once a viewer/toolchain decodes it), then compare it against ~1-2 ms/frame of fill/detile plus ~2.7 ms/frame of guard queries.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 15:12:49 +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/227#issuecomment-7351629391) 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#227
No description provided.