[pr-performance][rendering] Skip cached raw descriptor writes when disabled #231
Loading…
Reference in a new issue
No description provided.
Delete branch "andrewpozdnakov7-jpg/Darner:port/3833-skip-disabled-raw-view-staging"
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?
Contributor role (optional)
What it changes
Cached list views still stage raw twins when DARNER_RAW_VIEWS=0. Use the process-wide switch on both creation and rebuild. When raw views are enabled, keep staging those views so that another destination heap can use the cached descriptor.
Restores locally saved VIctory-NVIDIA work from December 1, 2026. Previous review: CodeFloe #391. Adapted by andrewpozdnakov7-jpg (GitHub profile).
How it was tested
097f80eonf3840d7.Checklist
Checked for overlap
Confirmed the work is skipped in real gameplay on an RTX 4070 Ti SUPER 16 GB (617.14), i5-13600KF, Windows 11. Compared release v2026.12.03.02 and an optimized build of
097f80e. Native 2560×1440, DLSS/FG/RT off, uncapped, stationary save. Each build started with the same warm cache and had one unscored warm-up. Scored 45 seconds starting 55 seconds after the first world frame, in A–B–B–A order.Both release windows emitted 44 nonzero raw-twin reports. Both PR windows had regular frame reports and zero nonzero raw-twin reports (sync_line emits one only when the count is positive). Turning the switch back on in the PR restored 44 nonzero reports, median 14,091.5 twins/frame. Zero shader misses or pipeline builds in all five scored windows. All runs exited 0. The game-window images before and after each window show the same parked vehicle and viewpoint, with traffic and idle animation varying.
The redundant descriptor work disappears with the switch off. FPS moved +1.3% in one pair and −2.7% in the other, so this scene does not establish a speedup.
Code-read review of
097f80e. I did not build or run it. akimfomin's A/B above already shows the staging work disappears withDARNER_RAW_VIEWS=0; this is only about when the gate applies.The PR gates on
raw_twins(), the env switch (descriptor/host.rs:3318). Whether twins exist at all israw_twins() && fits(2 * RAW_TWINS)(:3392), and only then isdarner_shader::emit::set_raw_views(RAW_TWINS)called (:3394). Heaps size their twin arrays fromdarner_shader::emit::raw_views()(:3547), andtwinsis empty when that is 0 (:3632). So on a host where heaps of 2^22 views do not fit (the code comments say NVIDIA caps view heaps atPORTABLE_VIEWS,:3365-3368), the default configuration (DARNER_RAW_VIEWSunset) still stages twins that no heap holds, and this PR leaves that in place.Suggestion: gate on
darner_shader::emit::raw_views() != 0instead of (or in addition to)raw_twins().probe_view_limit()is documented to run "before a shader is translated and before a view heap is made" (:3362-3363), so the value is settled by the timemake_listed_innerruns. Thehost view heaps hold ... raw_twins = ...log line on akimfomin's RTX 4070 Ti SUPER would show whether this applies there: if twins did not fit, his "switch on" 14k twins per frame were all wasted and a wider gate would remove them by default.This comment was written with AI assistance (Claude Code).
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.