Textures: alias copies texture to texture by default (DARNER_ALIAS_DIRECT on) #282
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
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!282
Loading…
Reference in a new issue
No description provided.
Delete branch "cafe/alias-direct-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?
What it changes
DARNER_ALIAS_DIRECTsays "not measured", and the switch is off.DARNER_ALIAS_DIRECT=1makes that one copy, texture to texture, for the formats D3D12 copies bit for bit (R32_UINT / R32_SINT and R9G9B9E5_SHAREDEXP).DARNER_ALIAS_DIRECT=0turns it off. The README row is updated. One test that assumed the switch was off now asksdirect()which way the layouts were made, so it passes either way.How it was tested
DARNER_ALIAS_DIRECTdiffers:The heavy opening pan is about −1.5 ms.
f3840d73d+ this commit:darner-gpulib tests: the same 5 failures as without the change, plus twowatch::tests that are flaky either way. Tests that need Shader Model 6.6 can't run on Windows 10's own D3D12.Checked for overlap
gtahub PR 50 also changes
texture.rs, but in other functions. No PR or issue mentionsDARNER_ALIAS_DIRECT.Another small GPU perf PR, anyone running ABBA tests, especially on a GPU bound machine, would be greatly appreciated ❤️
This one is just a default switch change, so even just testing this switch on top of your worktree helps if you can't be bothered rebuilding.
Windows 11 test of this switch: in-run A/B on a GPU-bound laptop.
Setup
f3840d73+ this PR (7e53e473), release build with--features ab. The translator id is unchanged, so the warm cache was used (pipeline library 938 MB).DARNER_AB=15,DARNER_ALIAS_DIRECT: the switch flipped every 15 s during one 16.7-minute run, so both sides saw the same places (moving around the city, not one fixed spot).DARNER_CARD_TIMES=1on both sides.written_as=42 read_as=67view line was logged 1861 times withdirect=falseand 1802 times withdirect=true.Result (61 phases in the world, 30 off and 31 on, 60 neighbouring pairs)
DARNER_CARD_TIMESgives 32.0 ms busy a frame (the union of the lists) against frames of about 37 ms.Replay A/B on RTX 5070 Ti desktop (Windows 11): about +5 % fps with
DARNER_ALIAS_DIRECT=1This adds a desktop Windows 11 data point next to the 2080 Ti and 5080 Laptop numbers above, with a well-sampled release baseline.
Measured release v2026.12.03.02 (
f3840d73) withDARNER_ALIAS_DIRECT=1against the same release with the switch unset. This PR only flips that default (plus README and a test), so the switch-on runs exercise the same code. Route: ~6.5 minutes replayed from the same save with recorded controller input (a cutscene, a scene cut and a stretch of free play). The path is hit: the R32_UINT → R9G9B9E5 view line is logged 59 times per run,direct=truewith the switch,direct=falsewithout.on the GPUms (host line)DARNER_ALIAS_DIRECT=1Config: RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 32 GB RAM, Windows 11;
scripts\play-nvidia.ps1 -Build release(Series X, 1440p native, DLSS Quality, no frame generation, ray tracing off, fullscreen, no fps cap). Each configuration had an unmeasured warm-up run first.Measured unattended on a replay bench (same save, recorded controller input); numbers and text prepared with Claude.
Test report on an RTX 4080 with hardware ray tracing: about 0.85 ms of card time a frame less, picture unchanged.
PC: RTX 4080 16 GB (driver 621.40), i7-13700K, 64 GB, Windows 11 26300. Series X profile, 1440p with DLSS Quality, frame generation off, hardware ray tracing on, Reflex off.
Build: main
47d21cd+ #334, #337, #457, #274, #397, #312, #304, #303, #438, #439, warm pipelines; onlyDARNER_ALIAS_DIRECTdiffers between the two runs (the switch, as in the release, so the same code this PR turns on).Method: the opening scene of one save, entered the same way every run (no input after the start screen); medians of per-second values from the host log in three 45-second windows from the moment the world appears; one run each.
DARNER_ALIAS_DIRECTunset=1So about 0.85 ms (3.6%) less card time with ray tracing on, next to the other cards above. The lit room 60 s in looks the same in both screenshots, and the logs have no errors besides Streamline's
presentCommon() was not observedonce at start, in both runs.Not tested: more than one run each, a scene outdoors.
Integrated cleanly onto
c8258f9, passedcargo xtask policy,clippy --all-features --all-targets -- -D warnings(0 warnings), and full unit tests (1,819indarner-gpu,219indarner), and ran stably over 30,000+ frames of Series X gameplay on RTX 5070 Ti 16 GB / Core Ultra 7 265KF / 64 GB DDR5-6400 (handling up to26,087 MBof texture uploads cleanly, including aliased R32/R9G9B9E5 light views) with zero crashes or visual regressions.[perf] Textures: alias copies texture to texture by default (DARNER_ALIAS_DIRECT on)to Textures: alias copies texture to texture by default (DARNER_ALIAS_DIRECT on)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.