[pr-performance][memory][frame-generation] Share the texture loading reserve with buffer copies #52

Open
SmallDevBigNothing wants to merge 1 commit from SmallDevBigNothing/Darner:codex/fg-reserve-overlap into main
Contributor

Refs #1

What it changes

The texture park’s loading reserve already includes copies of title buffers. Subtracting the buffer reserve from that lower target counted those copies twice. On a 4,640 MiB budget, a 2,300 MiB loading reserve and 835 MiB for buffer copies sent the 3,711 MiB admission target down to the 1,024 MiB floor.

Apply both limits to the original target and use the lower result. The buffer-copy limit still applies after the loading reserve settles.

How it was tested

  • Tested 34a3ba1 against 4a92569. Both built with cargo build --locked --profile diag -p darner.
  • cargo test --locked -p darner-gpu --lib pool::tests:: passed 59 tests, 3 ignored. Both workspace Clippy gates passed, including --all-features. The staged asset check passed.
  • The workspace tests hit write-watch failures on both revisions. A serial run passed all 1,706 active GPU library tests on the patch before the exhaustive f32 shader oracle was stopped. A later serial run reproduced watch::tests::ask_once_by_res_splits_reservations_without_refusals, also seen on main.
  • RTX 3060 12 GB, Core Ultra 5 225F, 32 GB RAM. Series S at 960×540 with DLSS Performance to 1080p, FSR 3 ×2, RT off. Each 75 s pair started from separate copies of the same save and Darner cache. FPS counts rendered frames.
Scenario Parked textures at end, MiB Rendered FPS p95 frame time, ms
4,640 MiB limit, fixed camera 2,559 → 2,117 22.43 → 22.74 57.03 → 57.62
4,640 MiB limit, scripted route 2,531 → 1,913 24.89 → 22.34 58.60 → 59.65
Native 11,345 MiB budget, scripted route 62 → 0 26.19 → 23.33 51.95 → 55.37
Native 11,345 MiB budget, warmer cache and reversed order 0 → 0 26.43 → 26.71 51.74 → 52.58

With the 4,640 MiB limit, the park kept 640 MiB of local texture blocks in both patch runs, up from 256 MiB on main. The fixed-camera worst frame went from 161 to 102 ms. The two scripted patch runs had late pipeline waits with worst frames of 3.53 s and 7.10 s. The warmer native repeat had no frames over 250 ms on either revision. Peak shared memory in that repeat fell from 3,534 to 3,392 MiB. Average FPS varied across the runs.

  • Coverage gaps: physical 6 GB hardware, DLSS frame generation and visual quality.

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related: #11 changes the Series X streaming heap, #25 selects settings by hardware, and #19 tracks a central VRAM manager. The open PRs leave texture-park admission untouched.
Refs #1 ## What it changes The texture park’s loading reserve already includes copies of title buffers. Subtracting the buffer reserve from that lower target counted those copies twice. On a 4,640 MiB budget, a 2,300 MiB loading reserve and 835 MiB for buffer copies sent the 3,711 MiB admission target down to the 1,024 MiB floor. Apply both limits to the original target and use the lower result. The buffer-copy limit still applies after the loading reserve settles. ## How it was tested - Tested `34a3ba1` against `4a92569`. Both built with `cargo build --locked --profile diag -p darner`. - `cargo test --locked -p darner-gpu --lib pool::tests::` passed 59 tests, 3 ignored. Both workspace Clippy gates passed, including `--all-features`. The staged asset check passed. - The workspace tests hit write-watch failures on both revisions. A serial run passed all 1,706 active GPU library tests on the patch before the exhaustive `f32` shader oracle was stopped. A later serial run reproduced `watch::tests::ask_once_by_res_splits_reservations_without_refusals`, also seen on `main`. - RTX 3060 12 GB, Core Ultra 5 225F, 32 GB RAM. Series S at 960×540 with DLSS Performance to 1080p, FSR 3 ×2, RT off. Each 75 s pair started from separate copies of the same save and Darner cache. FPS counts rendered frames. | Scenario | Parked textures at end, MiB | Rendered FPS | p95 frame time, ms | | --- | ---: | ---: | ---: | | 4,640 MiB limit, fixed camera | 2,559 → 2,117 | 22.43 → 22.74 | 57.03 → 57.62 | | 4,640 MiB limit, scripted route | 2,531 → 1,913 | 24.89 → 22.34 | 58.60 → 59.65 | | Native 11,345 MiB budget, scripted route | 62 → 0 | 26.19 → 23.33 | 51.95 → 55.37 | | Native 11,345 MiB budget, warmer cache and reversed order | 0 → 0 | 26.43 → 26.71 | 51.74 → 52.58 | With the 4,640 MiB limit, the park kept 640 MiB of local texture blocks in both patch runs, up from 256 MiB on `main`. The fixed-camera worst frame went from 161 to 102 ms. The two scripted patch runs had late pipeline waits with worst frames of 3.53 s and 7.10 s. The warmer native repeat had no frames over 250 ms on either revision. Peak shared memory in that repeat fell from 3,534 to 3,392 MiB. Average FPS varied across the runs. - Coverage gaps: physical 6 GB hardware, DLSS frame generation and visual quality. ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related: #11 changes the Series X streaming heap, #25 selects settings by hardware, and #19 tracks a central VRAM manager. The open PRs leave texture-park admission untouched.
The frame generation loading reserve already includes copies of title buffers. Apply both limits to the original target so the texture park reserves that room once and still protects future copies after the loading reserve settles.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'codex/fg-reserve-overlap:SmallDevBigNothing-codex/fg-reserve-overlap'
git switch 'SmallDevBigNothing-codex/fg-reserve-overlap'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'SmallDevBigNothing-codex/fg-reserve-overlap'
git switch 'SmallDevBigNothing-codex/fg-reserve-overlap'
git rebase 'main'
git switch 'main'
git merge --ff-only 'SmallDevBigNothing-codex/fg-reserve-overlap'
git switch 'SmallDevBigNothing-codex/fg-reserve-overlap'
git rebase 'main'
git switch 'main'
git merge --no-ff 'SmallDevBigNothing-codex/fg-reserve-overlap'
git switch 'main'
git merge --squash 'SmallDevBigNothing-codex/fg-reserve-overlap'
git switch 'main'
git merge --ff-only 'SmallDevBigNothing-codex/fg-reserve-overlap'
git switch 'main'
git merge 'SmallDevBigNothing-codex/fg-reserve-overlap'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
TrustNo1/Darner!52
No description provided.