Texture pass: cards over 12 GiB keep twice the baseline time past the card's line #552
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!552
Loading…
Reference in a new issue
No description provided.
Delete branch "nyutt/texspk-cap-large-cards"
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
tex_due_layer_late), 45-72 % of the passes stopped at their time (passes out of time), the pass at 10-17 ms a frame in the median.The frame's cap (
texspk_cap_ms, fromDARNER_TEXSPK_PASS_MS, 8 ms indarner playandplay-nvidia.ps1) is doubled on cards over 12 GiB only while the card has room below its line. In this flight the card is past its line for half the time or more, so the cap falls back to 8 ms. Most of the slots that wait bring textures already on the card up to date, which needs no room: room only decides whether new host copies are made, and the pass checks it for each one.This change starts cards over 12 GiB from twice the baseline: 16 ms past the line or under host-RAM pressure, 32 ms with room, 48 ms catching up. That is what
DARNER_TEXSPK_PASS_MS=16already gave such cards. Cards at 12 GiB and below are unchanged (8 / 8 / 24 ms); the 8 ms baseline was measured on the walking route on an RTX 4090. One function and its test,crates/darner-gpu/src/draw.rs.What the cap was not: DirectStorage served the title's requests in 15-20 ms on average with under one of its four workers busy (
DARNER_DSTORAGE_LOG, three runs), and eight workers changed nothing that was delivered. Slots waiting for the title (tex_due_title_late) stayed at 50-95.How it was tested
Tested revision:
864b5b7(onmainc8258f9), built with the bench kit's in-game route patch and #361's pin-write fix, both added only to the bench builds.Commands and results:
cargo xtask policy: asset policy, 576 files okcargo clippy --workspace --all-targets --locked -- -D warnings: passcargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passcargo test -p darner-gpu --locked --lib texspk: 2 passedcargo test -p darner-gpu --locked --lib: passed in 2 of 6 runs. The failing test changed from run to run (watch::watch_pipe_epoch_tests::ask_once_delta_reask_direct_carves_refreshes_and_updates_page_epochs,watch::tests::streamed_texture_written_through_an_alias_reaches_a_full_queue,descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync), each passes alone, andmainc8258f9in the same worktree failed in 2 of 5 runs with the same kind of failures (watch::tests::streamed_texture_written_through_an_alias_reaches_a_full_queue,host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_end,host::refresh_tests::refresh_front_zero_arc_matches_and_runs_due).Changes a default: yes, for cards with more than 12 GiB of video memory.
A/B result: bench kit, cam-city60 (65 s over the city), in-game flight, alternated orders (A B A, then B A B), A =
mainc8258f9, B = this change. Two runs of the first batch compiled about 140 pipelines each (cache seeded just before) and are left out; the four below compiled 2-6 each.tex_due_layer_lateavgThe same scaling as a switch on a main build (
DARNER_TEXSPK_PASS_MS=16, four runs against three of 8 ms, alternated): 197-251 against 345-620 waiting, 11-21 % against 45-60 % of passes out of time, median fps 26.8 against 25.5 (spread 2.1 and 0.9). No frame-rate gain is claimed from these; the frame rate did not drop.Gates run on that revision:
cargo xtask policyand both clippy gates.cargo test --workspace --lockedwas not run;cargo test -p darner-gpu --locked --libas above.Gameplay: RTX 5070 Ti 16 GB, Ryzen 7 7800X3D, 31 GB RAM, Series X profile, DLSS Quality 1080p to 1440p, DLSS frame generation 2x, hardware ray tracing on.
Hardware dependence: cards over 12 GiB only. Measured on one PC; untested on other CPUs, where the pass's thread may have less time to spare.
Coverage gaps: one route (cam-city60); no walking or driving route; no card at 12 GiB or below (unchanged by design).
Checklist
main.docs/asset-policy.md.Checked for overlap
🤖 Generated with Claude Code
Tested on a 4080 SUPER under Linux (Proton Experimental, NVIDIA 620.85.02, vkd3d-proton 3.2.0), a different platform from yours. One run per case, no repeats — so these are one data point, not a variance study.
What I measured (world frames only, >1000 draws/frame; same build
562a8653both runs, one switch apart):maindefault (8 ms)DARNER_TEXSPK_PASS_MS=16preparingBoth figures in the last row are the layer's own
textures picked by index … N waitingline, which is a snapshot of the queue, not a run total. The worst frame going from 172 to 77 ms is the part a player feels; the queue is what your description predicted and it matches — this card sat past its line for most of the run,no room, new textures waitwas the steady state, and the queue was 1,542 deep.Why raising the cap helps is worth stating: fewer, longer passes mean fewer fence waits and fewer times a slot is dropped because its pass ran out of time. That is consistent with the median falling while
preparingfalls only slightly.One thing that changes what the PR does.
mainalready carries the "double the baseline over 12 GiB" half:but the function returns
base_cap_msbefore reaching it when!room || pressured. On this card that early return is the steady state, so neither the ×2 nor the ×3 of catch-up is ever reached — under pressure the card gets a smaller cap than an idle one. That is exactly the case your description calls out ("the cap falls back to 8 ms"), and it is whyDARNER_TEXSPK_PASS_MS=16removes this pattern here whilemaindoes not. If "past the line" is meant to be covered, the scaling has to move before the early return, or inside it.Also: the PR page reports
mergeable: no — head branch deleted. The branch it points at no longer exists, so it cannot be merged as it stands.Not measured, for honesty: I did not A/B the branch itself against
main. The numbers above are the switch, which your description says gives the same effect. And crossing a zone boundary is far worse for an unrelated reason —preparingreaches 497 ms withGPU 0.0and frames of 1.9–2.8 s — so the zone-load freeze is not something this cap addresses.Repro, if you want it:
--set DARNER_TEXSPK_PASS_MS=16on an RTX 4080 SUPER, Linux,WINEDLLOVERRIDES="dxgi=n,b", driving the same route twice.Tested
864b5b7vsorigin/main(c8258f9) via two unattended 90 sscripts/bench.ps1runs (same switches, identicaldiagprofile without--features diagnostics, warm cache, RTX 5070 Ti 16 GB, Series X, 1080p->1440p DLSS Quality, DLSS MFG 3x, RT off,DARNER_RDNA_FLOAT=2,DARNER_SAMPLED_MARKS=0):origin/main(c8258f9)864b5b7)4500-7000 drawsband7000+ drawsbandThis directly exercises the >12 GiB tier (
16 GBcard) and matches the author's expectation: zero time-capped passes, 31% lower relative neutral-texture rate, oldest backlog slot dropped from2,688frames onmainto2frames at end of run, anddraw::testspassed 15/15. (Single A/B pair; not a full ABBA.)[pr-performance] Texture pass: cards over 12 GiB keep twice the baseline time past the card's lineto Texture pass: cards over 12 GiB keep twice the baseline time past the card's lineTest needed — commit
864b5b7a; what to check:tex_due_layer_late), 45-72 % of the passes stopped at their time (passes out of time), the pass at 10-17 ms a frame in the median.The frame's cap (
texspk_cap_ms, fromDARNER_TEXSPK_PASS_MS, 8 ms indarner playandplay-nvidia.ps1) is doubled on cards over 12 GiB only while the card has room below its line. In this flight the card is past its line for half the time or more, so the cap falls back to 8 ms. Most of the slots that wait bring textures already on the card up to date, which needs no room: room only decides whether new host copies are made, and the pass checks it for each one.This change starts cards over 12 GiB from twice the baseline: 16 ms past the line or under host-RAM pressure, 32 ms with room, 48 ms catching up. That is what
DARNER_TEXSPK_PASS_MS=16already gave such cards. Cards at 12 GiB and below are unchanged (8 / 8 / 24 ms); the 8 ms baseline was measured on the walking route on an RTXEvidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.
Reply
testingto take this run; it's free again after 24 h with no results.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.