play: DARNER_ALIAS_SHARE on by default again, now that it stays off where it removed the device #613
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!613
Loading…
Reference in a new issue
No description provided.
Delete branch "Andreww2009/Darner-Opt:claude/alias-share-play-default"
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
darner playleavesDARNER_ALIAS_SHAREoff on every PC, also on those where it runs. Without it, an R9G9B9E5 view (format 67) that the title places over an R32_UINT texture its compute shaders write (the light it packs) gets a host texture of its own, and a copy through a buffer fills it (ee4bfd2b's doc: 260 copies and 2.0 ms of card time a frame on an RTX 5080). With it, the view takes the host copy of the texture under it, and there is no copy. On an RTX 5080 Laptop (below) that took 2.2 ms of card time off a frame with the view held still; TrashBox measured about 2 ms on an RTX 4070 (#83).Why it is off: it was a
darner playdefault fromf6e84ff9(2026-12-02) and came out the same day in09445ee5, after it removed the device (0x887A0001) at load on Windows 11 23H2 and on a 4080 SUPER on Windows 11 (CodeFloe issues 226, 230 and 242). Since thenresource::alias_sharekeepsDARNER_ALIAS_SHARE=1off by itself where that happened:ebf015b6,SHARE_FROM_BUILD= 26100);fa8ca22b: all 17 device losses at an invalid call in the first seconds in the 2026-12-02/03 logs were on such PCs; with shared textures, such PCs' starts ended that way 13 times in 30, PCs with GPU upload heaps 0 in 58);What this does: puts
("DARNER_ALIAS_SHARE", "1")back into play'sSETTINGS, with a comment on why it can be there now and what it gave here, and updates its README row (default "1 (on) in darner.exe, off otherwise";0 = offadded to the values). A PC the guards hold back gets one info line in its log ("DARNER_ALIAS_SHARE stays off …") and runs as on main.DARNER_ALIAS_SHARE=0indarner-settings.txtturns it off;forcestill turns it on past the guards. Likef6e84ff9, this leavesscripts/build-darner.ps1alone (it never set it).How it was tested
Tested revision:
43b93a60(this commit, onmainc8258f95) for the gates below. The game runs did not use this build: they setDARNER_ALIAS_SHARE=1by hand, on the release v2026.12.04.01 (9b288a70:mainwithout its last two merges, a test lock and aramtrimchange) and on a local diagnostics build ofc8258f95with #335 and #461 merged (cargo build --locked --offline --profile diag -p darner --features diagnostics; both of their switches off in the still run below:DARNER_OCCLUSION_FAR=0,DARNER_TITLE_WRITE_NOTICEnot set). With the switch set by hand, the code that runs is the code this default turns on.Commands and results (Windows 11 Home 26300, rustc 1.98.1, MSVC 14.44.35207, SDK 10.0.26100.0), on
43b93a60, each with--offlineaftercargo fetch --locked:cargo xtask policy:asset policy: 576 files ok.cargo test --locked -p darner: 208 passed, 1 ignored (and 2 + 2 + 8 incache_paths,census,picked_folders), among themplay::tests::a_plain_start_is_the_launchers(a plain start carries everySETTINGSentry, so this one too) andplay::tests::the_powershell_launcher_sets_no_play_default_differently.cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean.cargo test --workspace --locked: 3 520 passed, 0 failed, 121 ignored (darner-gpu1 823 passed,darner-shader568).Changes a default: yes, in
darner play, for PCs on Windows 11 24H2 or newer with GPU upload heaps and relaxed format casting, and under Wine/Proton wherever the card has relaxed format casting (alias_shareholds neither guard against Wine, as on main with=1).A/B result: RTX 5080 Laptop 16 GB, driver 621.47, Core Ultra 9 275HX, Windows 11 Home 26300, on the charger, warm cache; Series X profile, 1440p, DLSS Quality, frame generation off, no frame cap, ray tracing off, Reflex boost. World frames only (5 000 draws or more) from
DARNER_BENCH_CSV; card time is itscard_lists_ms(DARNER_CARD_TIMES=1).Still view, A B A B (the diagnostics build;
DARNER_SKIP_START=1, so the same view after the load each time and nobody at the controls; 150 world seconds each, closed by a script; A =DARNER_OCCLUSION_FAR=0, B = the same +DARNER_ALIAS_SHARE=1):Draws per frame fell over the run, so adjacent sessions are compared in matched 500-draw bands (B − A): card time −3.58 / −1.94 / −1.27 ms, frame p50 −1.43 / −1.95 / −0.96 ms. With a linear drift taken out ((d1 + 2·d2 + d3) / 4): card time −2.18 ms, frame p50 −1.57 ms, frames over 50 ms 67 → 38 per 1 000. p99 and p99.9 do not move; the two frames over 200 ms in each session are the world's first second.
Driving, one session each way (the release; A then B, 151 world seconds each, the player driving):
One drive each way depends on what was on screen, so I take the still run as the measure, and this as the same sign in motion.
Device: no device removal and no ERROR line in five starts with it on this PC (B of the drive above, both B sessions of the still run, a driving session with the diagnostics build, and the player's own 7-minute session on the release with frame generation 2x and a 60 fps cap): about 17 minutes in the world, each log with the "a placed texture shares the host copy" line. In #83, TrashBox (RTX 4070, Windows 11 26300) had no device loss "every time we used it".
Picture: the flicker detector (
DARNER_FLICKER_DETECT=1, default limits) counted no flicker, black or frozen frames in the world in any of the four still sessions. In the driving session with the diagnostics build it flagged 116 against 63 in the session before it without the switch, all of the excess in the last 50 s, when the player drove another car through tyre smoke; the flagged tiles there are road markings, poles and smoke passing at about 20 fps, so a driving session cannot compare it.Gates run on that revision: all three, plus
cargo xtask policy, on43b93a60(above).Gameplay: RTX 5080 Laptop GPU, Series X profile, 1440p, DLSS Quality, frame generation off in the A/B runs (2x in the player's session), ray tracing off.
Shader wave sizes tested: not relevant (no shader change).
Hardware dependence: needs Windows 11 24H2 or newer (or Wine), GPU upload heaps (Resizable BAR) and relaxed format casting; elsewhere it stays off by itself. Measured on NVIDIA only: the RTX 5080 Laptop here and the RTX 4070 in #83, both on Windows 11 26300.
Coverage gaps:
a_plain_start_is_the_launchers.1from play; that code is main's, unchanged).Checklist
main.docs/asset-policy.md.Checked for overlap
DARNER_ALIAS_DIRECTon by default: copies between such textures go texture to texture; a view this shares needs no copy, the others still take #282's path), #443 (DARNER_E5_TARGETS: a 32-bit stand-in for R9G9B9E5 render targets), #600 (changes other lines of play'sSETTINGS), #589 (the translator's stores of packed lighting; a different code path).🤖 Generated with Claude Code
[pr-performance][rendering] play: DARNER_ALIAS_SHARE on by default again, now that it stays off where it removed the deviceto play: DARNER_ALIAS_SHARE on by default again, now that it stays off where it removed the deviceTest needed — commit
43b93a60; what to check:darner playleavesDARNER_ALIAS_SHAREoff on every PC, also on those where it runs. Without it, an R9G9B9E5 view (format 67) that the title places over an R32_UINT texture its compute shaders write (the light it packs) gets a host texture of its own, and a copy through a buffer fills it (ee4bfd2b's doc: 260 copies and 2.0 ms of card time a frame on an RTX 5080). With it, the view takes the host copy of the texture under it, and there is no copy. On an RTX 5080 Laptop (below) that took 2.2 ms of card time off a frame with the view held still; TrashBox measured about 2 ms on an RTX 4070 (#83).Why it is off: it was a
darner playdefault fromf6e84ff9(2026-12-02) and came out the same day in09445ee5, after it removed the device (0x887A0001) at load on Windows 11 23H2 and on a 4080 SUPER on Windows 11 (CodeFloe issues 226, 230 and 242). Since thenresource::alias_sharekeepsDARNER_ALIAS_SHARE=1off by itself where that happened:ebf015b6,SHARE_FROM_BUILD= 26100);Evidence 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.