Findings from CNF that could be implemented #617
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner#617
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
WARNING: This was written with Claude Opus 5.5, so proceed at your own risk.
What you would like
[enhancement] What Darner could take from larp: decoded-texture store, the title's graphics settings in F1, hardware RT replacements, more recording threads
What you would like
Summary. larp is another GPL-3.0-or-later VIctory fork for the same retail image (
b99f876b…). Reading both trees side by side, four of its features have no counterpart in Darner and look portable: a store of decoded DirectStorage results kept across runs, the title's own graphics settings in the menu, hand-written replacement shaders that put the ray-traced passes on hardware ray queries, and more command-recording threads than the title has. Each is described below with where it lives in larp, where it would plug into Darner, and what to test. Each would be its own pull request with an A/B result, per CONTRIBUTING.What was compared, and how.
0f03265(2026-12-05), whose first commit imports larp1c2a608.amdxc64view-handle fix, the water tiles' first-thread init, keyboard and mouse) are left out. So is everything where Darner is already ahead or equal: network isolation, file mapping and crash handling (90-97% of larp's lines innet.rs,files.rs,crash.rsare in Darner's longer versions), pads, Streamline (DLSS, FSR, Reflex), VRAM and texture budgets, the title's thread masks onto fast cores (kernel.rsSetThreadGroupAffinity), letterboxing, the pipeline wait, DSP convolution and Opus.1. A decoded-result store for DirectStorage (self-contained, lowest effort)
What larp does.
crates/larp-hle/src/modules/dstorage/store.rs(646 lines) andstats.rs(312) keep the bytes a BCPack request with a file source decoded to, across runs. A repeat request is then a read and a copy, with no inflate and no BCPack decode.data.bin(records appended) andindex.bin(one fixed record per entry: key, where its data record starts, its lengths, the CRC-32 of the decoded bytes, the record's own CRC-32).LARP_DSTORAGE_CACHE_GB(256 by default).LARP_DSTORAGE_CACHE_CHECK=1(diagnostics builds) decodes every hit again and compares.Darner today.
crates/darner-hle/src/modules/dstorage.rsreads the source, inflates and callsbcpack::decodeon every request (around theinto_destinationcall). Nothing is kept between runs.Where it would plug in. In that decode path: look the key up before
read_source, and queue the decoded bytes after a successfulinto_destination. The store would sit under Darner's cache folder.What to test.
2. The title's own graphics settings in the F1 menu
What larp does.
crates/larp-game/src/settings.rs(545 lines) maps about 40 fields of the title's settings block: each one's type, the values offered, and when a change reaches the picture.crates/larp-hle/src/settings/file.rsandmenu.rs. larp's FAQ already tells 8 GB card users to lower Texture Detail there when VRAM fills.Darner today. The F1 menu (
crates/darner-gpu/src/host/menu.rs) offers host-side controls such as TEXTURE LOD BIAS. I found none of the title's settings fields in Darner.Where it would plug in. The field table could come across nearly as is, since it targets the same build. Its entries would become lines in
host/menu.rs, saved alongside Darner's own settings.What to test.
3. Hardware ray tracing: hand-written replacement shaders (and a comparison of the RT paths)
What larp does.
docs/faq.md). In Darner bothDARNER_BVH_BUILDERandDARNER_HW_RTare off and described as a trial.crates/larp-gpu/src/shader_replace.rs(833 lines) swaps the translation's DXIL for a compiled replacement chosen by program hash.PSV0at first use.<hash>.<stage>.viewsdeclares the structure views a replacement traces with ray queries.<hash>.<stage>.interfacesupplies an interface for a program that does not translate.shaders/replace/README.md.apps/larp/build.rscompiles the HLSL with dxc.crates/larp-gpu/src/sparse.rsbacks RT structure memory and the triangle position pool with reserved buffers mapped chunk by chunk.rt.rsandbvh.rshold the rest of the path.Darner today.
emit/rayquery.rslifts traversal loops toRayQuerywhere every value is accounted for, and falls back to the software walk where it is not.emit/lower/analysis.rskeeps out of the wave-wide fallback, larp has hand-written replacements for six:0f9382de73901605,be1e7049f0bd75d0,c44697c4f620d86e,ca91c1392fd098a4,d5f6125b52723fc9,f76abe011ea678b3.Where it would plug in.
darner-gpupipeline creation.t248+, with the position pool and counters atu252. Darner binds at root SRVt230..t241.DARNER_HW_RT_WHY=1and the "ray queries lifted N of M" log lines.What to test.
DARNER_HW_RT=1, the same scenes with and without each replacement: picture, card time, and the lifted/fell-back counts.rt.rs/sparse.rshandling is worth taking, beyond the shaders.4. More command-recording threads than the title has (largest possible CPU gain, most fragile)
What larp does. The title records its parallel render phases on five threads, with per-thread static arrays sized for five or six. larp raises that to eight by default (
LARP_SUBRENDER_WORKERS, 6 to 8; 5 leaves the title as it is). Before the title runs:Files:
apps/larp/src/subrender.rs(797 lines),crates/larp-game/src/subrender.rs(331),subrender_table.rs(98),crates/larp-loader/src/replay.rs(414), and the relocation incrates/larp-loader/src/relocate.rs.Darner today. I found nothing equivalent; the title keeps its five recording threads.
What to test.
5. Smaller: time-based mouse look smoothing
larp's
gameinput/mouse.rs(larp commitb5e09e0, its issue #11) turns mouse counts into a velocity and smooths it with a time constant (about 20 ms while moving, 12 ms on stopping), scaled by the real time between polls. Darner'sgameinput.rsMouseLookblends each 8 ms poll 0.6/0.4 by count. larp made this change against judder between its poll loop and the title's 30-60 Hz reads. Whether Darner's mouse look has the same judder has not been checked.Credit. larp is GPL-3.0-or-later, like Darner. A port can cite the repository and commit, as
cores.rsdoes for fxceless.Nothing from the game is attached or quoted here. Program hashes and Darner's own switch names are the only identifiers used.
Drafted with an AI assistant (Claude) from a static reading of both trees, and read by me before posting.
Are you working on a fix?
No
Are you working on a fix?
No
Nice one, bro.
Can't wait to see what CNF's findings could bring to Darner once properly integrated and polished. Great work, keep it up!
[enhancement] Findings from CNF that could be implementedto Findings from CNF that could be implemented