forked from TrustNo1/Darner
[pr-performance][AMD] On rebar-upstream: one slot reference per view (DARNER_SLOT_REFS_ONCE, off), less table work a call, two diagnostics fixes #4
Loading…
Reference in a new issue
No description provided.
Delete branch "duckey-dev/Darner:rebar-amd-ports"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What it changes
Four commits on top of theforgotten669's rebar-upstream (
f6d25d2, #2), found while testing it on an RX 7900 XTX. Each commit stands alone; I can split them into separate PRs if you prefer.DARNER_SLOT_REFS_ONCE, off by default). Every slot filled from a list's view cache took its own AddRef: ~85k a frame in a heavy scene, ~5% of the list threads' busy samples plus ~2% in the per-slot lock. With the switch the list's State holds each view's resource once per recording. Correct withDARNER_TABLE_LISTSon or off; withDARNER_RELEASE_ASIDEthe holding stays until the list's reset or drop.DARNER_CALL_STATS=1. Diagnostics builds read the clock on every list call and table fill with no switch (~10% of list-thread busy samples). Release builds are unchanged.DARNER_TIMELINEshowed the card idle with work it had already run. Five round trips at first use measure the offset and shift the stamps. Diagnostics builds only.host::stamps::tests::a_submissions_times_are_the_pcsfails on that card without commit 4.How it was tested
Tested revision:
65a56cb(this branch; the game runs used the same tree).Machine: Ryzen 7 7800X3D, RX 7900 XTX (ReBAR on), Windows 11. Series S profile, the game's 1920x1080, standing still on a heavy save. Switches
DARNER_HW_RT=1 DARNER_RELAY=2 DARNER_PORT_CBV=1 DARNER_EARLY_DEPTH=1 DARNER_REBAR_POOLS=1, diag builds.Changes a default: no.
DARNER_SLOT_REFS_ONCEflipped in-run (DARNER_AB=10with a no-op switch on the first bit), 2 runs of 420 s, 86 phases of 10 s, frame time fitted at equal draws:On our own branch without the pool the same switch gave -1.3 ms (one 480-s run). No device loss over ~40 flips.
All four commits together, switch off, against rebar-upstream
f6d25d2, pool on, one pair of 240-s runs (indicative only: the two runs drew different call counts a frame):f6d25d2Commit 3 only matters in diagnostics builds, so part of this does not carry to release builds.
Gates run: none of the three full gates.
cargo test -p darner-gpu --lib --locked --features diagnosticson each commit alone and on this branch: 1920-1925 pass. The failures are not from these commits:compose::tests::bgrx_plane_selects_a_typed_viewandshader_cache::tests::the_key_a_preload_list_is_made_under_follows_the_switchesfail onf6d25d2too;host::stamps::tests::a_submissions_times_are_the_pcsfails on this card without commit 4;pipeline::make::tests::a_capped_draw_waits_once_then_dropsand one watch test are timing flakes that passed on re-run or on this branch.Hardware dependence: commit 4 matters on cards whose clock calibration is off (seen on an RX 7900 XTX); 1-3 likely general.
Coverage gaps: picture not checked by eye yet (commit 1 changes object lifetimes, not shading). Commit 4's code only runs with
DARNER_TIMELINE, which was not on in these runs (checked on our own branch: "card clock: stamps shifted by -11.73 ms"). No NVIDIA or Intel runs.AMD results for
DARNER_REBAR_POOLS(rebar-upstream923aafbas it was)Same exe, pool off / on / on / off, 4 runs of 249 s, same machine and scene as above:
At equal draws: median -1.9 ms, mean -2.2 ms, 90th percentile -3.4 ms. The pool (1277 MB, Series S profile) sits in card memory; setting it up took 8.9 s once at start. Card memory in use 17.2-18.5 GB of a 22.7 GB budget. No device loss in these runs or in 5 more with the pool on. Left over: reads through the card, ~13 round trips and 3.8-3.9 ms a frame. With the pool on, the submitting thread mostly waits on list translation, which is what commits 1-3 cut.
Checklist
main. (Four commits, based on rebar-upstream.)docs/asset-policy.md.Checked for overlap
🤖 Generated with Claude Code
0ad269d444to0f0ff37640Moved to theforgotten669/Darner, into rebar-upstream, as its author asked: theforgotten669/Darner#1
Pull request closed