Texture read-backs: buffers kept by size and used again (VICTORY_TEXBACK_POOL=1) #371

Closed
github-bot wants to merge 0 commits from github-bot/gh-371 into main AGit
Owner

@⁠yagizakkaya01 on GitHub · 2026-12-01 19:36 UTC · original
yagizakkaya01:pr/texback → main · +42 −2 · 2 files · 1 commits · closed without merging

Requested by yağız akkaya · project thread

For #361.

Every texture copied back into title memory (the water maps) made a new committed read-back buffer on a list thread and dropped it after landing, about 13 a frame. With VICTORY_TEXBACK_POOL=1 the buffers are kept by size (at most 64) and used again once their list has run. Off by default.

Machine 1: RTX 4070 Laptop 8 GB, Ryzen 9 7940HS 8C/16T, 32 GB. Series S, DLSS Performance, 30 fps. Same street, standing still, medians after minute 4.

  • WPR profile before the change: buffer creation (CreateCommittedResource from texback::record) was ~11% of the list threads' CPU.
  • List translation per call (list calls translated … in … ms): 9.1 → 8.0 µs. This run also had SPARE_MOST_MB=512, your two later commits and a target-cpu=native build, and it was night in game, so it is not this change alone. preparing per frame: 52 → 68 ms on that night run (heavier scene: GPU busy 55 → 73%).

Machine 2: RTX 4060 Ti 16 GB desktop. Series S, DLSS Performance, FG on. Free play, whole-session medians, all four changes plus WIDE 4, THIN 5, UNDER 4, VIEW 4, LAND 2 against the release defaults:

  • list translation per call 5.06 → 4.03 µs, list steps 18.1 → 12.2 ms per frame.

A clean A/B of this switch alone (same build, only TEXBACK_POOL changed) is still to come. I'll add it here.

🤖 Generated with Claude Code

**@⁠yagizakkaya01** on GitHub · 2026-12-01 19:36 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/371) `yagizakkaya01:pr/texback` → `main` · +42 −2 · 2 files · 1 commits · closed without merging <!-- claude-projects-attribution: {"github_login":"yagizakkaya01"} --> _Requested by **yağız akkaya** · [project thread](https://claude.ai/code/project/chan_01NXDwzZjZwLk73ttN9aPba7?thread=cmsg_01NXDwzZjZwLk73ttN9aPba7JV4k53Ls6GvVA5PUvye88n)_ For #361. Every texture copied back into title memory (the water maps) made a new committed read-back buffer on a list thread and dropped it after landing, about 13 a frame. With `VICTORY_TEXBACK_POOL=1` the buffers are kept by size (at most 64) and used again once their list has run. Off by default. **Machine 1:** RTX 4070 Laptop 8 GB, Ryzen 9 7940HS 8C/16T, 32 GB. Series S, DLSS Performance, 30 fps. Same street, standing still, medians after minute 4. - WPR profile before the change: buffer creation (`CreateCommittedResource` from `texback::record`) was ~11% of the list threads' CPU. - List translation per call (`list calls translated … in … ms`): 9.1 → 8.0 µs. This run also had `SPARE_MOST_MB=512`, your two later commits and a `target-cpu=native` build, and it was night in game, so it is not this change alone. `preparing per frame`: 52 → 68 ms on that night run (heavier scene: GPU busy 55 → 73%). **Machine 2:** RTX 4060 Ti 16 GB desktop. Series S, DLSS Performance, FG on. Free play, whole-session medians, all four changes plus `WIDE 4, THIN 5, UNDER 4, VIEW 4, LAND 2` against the release defaults: - list translation per call 5.06 → 4.03 µs, list steps 18.1 → 12.2 ms per frame. A clean A/B of this switch alone (same build, only `TEXBACK_POOL` changed) is still to come. I'll add it here. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 19:37:37 +00:00
Author
Owner

@⁠readmet3xt-lab on GitHub · 2026-12-01 21:09 UTC · original

Thank you. A read-back buffer pool doing the same job is already in the build and on by default (VICTORY_READBACK_POOL, from #116), so we won't take this one as well. If your numbers show a case the existing pool misses, please tell us here.

**@⁠readmet3xt-lab** on GitHub · 2026-12-01 21:09 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/371#issuecomment-7325824225) Thank you. A read-back buffer pool doing the same job is already in the build and on by default (`VICTORY_READBACK_POOL`, from #116), so we won't take this one as well. If your numbers show a case the existing pool misses, please tell us here.
github-bot closed this pull request 2026-12-01 21:50:05 +00:00
Author
Owner

@⁠yagizakkaya01 on GitHub · 2026-12-01 21:47 UTC · original

Thanks, that makes sense. I checked #116: it does the same as mine (same keying by size, same limit, returned after the list has run), and my ~13 buffers a frame were measured on v0.8.2, before it. I found no case it misses, so I'm closing this one.

**@⁠yagizakkaya01** on GitHub · 2026-12-01 21:47 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/371#issuecomment-7326781151) Thanks, that makes sense. I checked #116: it does the same as mine (same keying by size, same limit, returned after the list has run), and my ~13 buffers a frame were measured on v0.8.2, before it. I found no case it misses, so I'm closing this one.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.