forked from TrustNo1/Darner
main #7
Loading…
Reference in a new issue
No description provided.
Delete branch "TrustNo1/Darner:Main"
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
How it was tested
Checklist
main.docs/asset-policy.md.Checked for overlap
Driving with hardware RT dropped to 12-17 fps (RTX 5090, Series X, 4K DLSS Quality) and recovered within seconds of stopping; walking was fine and RT off was fine. BLAS prep took ~200 ms of CPU per second while driving. The new prep timers put it in reading title memory: decoding a meshlet index buffer took ~240 us and quant24 vertices ~10x what the decode itself costs, because `title_readable` ran `watch::materialize`, which makes every view the runtime keeps in its books alone (DARNER_SOFT_VIEWS) a mapping of the host's: 1,400-2,400 every 10 s while driving ("asked for by the GPU side"), none with RT off. One of them ran on the title's thread for every geometry with a transform (the deferred-build transform copy,6a5f7ee). - DARNER_HW_RT_SOFT_READS (on unless 0): transforms, quant24 vertices, meshlet indices and the plain index range scan are copied out through `host::read_into`, as the GPU side reads title memory; the old path stays as the fallback. A test checks both decodes give the same bytes. - DARNER_HW_RT_BLAS_HEAPS (on unless 0): BLAS buffers up to 16 MB are placed in 64 MB heaps (2.6 us to make vs 240 us committed on the same card); their units go back when the D3D12 object goes (a private-data object the runtime releases), so they live as long as before. - DARNER_HW_RT_MESHLET_ARENA (on unless 0): decoded meshlet index buffers go into 32 MB mapped upload blocks in 4 KiB units, charged what they take (the cache held ~4,000 at 64 KiB each and thrashed), units reused after the entry's retirement. - BLAS budget: on cards with 28 GB or more, a tenth of the budget up to 4 GB (1.5 GB filled with 6,064 evictions in 8 minutes on 32 GB); DARNER_HW_RT_BLAS_BUDGET_MB sets it. - Report lines: BLAS buffer making, BLAS prep split, meshlet cache misses and their time, the decoded meshlet blocks. Same route, same settings: 12.5-17.5 fps driving before the reads change, 20-35 after; BLAS prep ~200 -> ~25 ms per second; meshlet miss 240 -> 18 us; host views asked for by the GPU side 1,400-2,400 -> 0 per 10 s. Co-Authored-By: Claude Opus 5.5 <[email protected]>4a92569fb7e96ad6840With FG TYPE FSR 4 and HDR on, the swap chain is R10G10B10A2 and fsr.rs kept ordinary presents ("only the donor's SDR swap-chain format is supported"). AMD's FSR Frame Generation 4.0.2 documentation lists no such limit, its swap chain takes the PQ transfer function from SetColorSpace1, and the monitor's luminance range when the app sets no HDR metadata (FrameInterpolationSwapchainDX12.cpp in SDK v2.4.0, the 3.1 swap chain). - crates/darner-gpu/src/streamline/fsr.rs: the check takes HDR10 (R10G10B10A2_UNORM) besides SDR (R8G8B8A8_UNORM). Other formats, such as a float (scRGB) back buffer, keep ordinary presents as before: not tested. FG_HIGH_DYNAMIC_RANGE stays as it was: only for a float back buffer. Seen on an RX 9070 with HDR on and DARNER_RELAY=2 (2026-12-03): swap-chain provider 4.0.0 and generator 4.0.2 confirmed, context made with format=24, "212 presents with it on, 0 off" after the first upscalings. The picture is as bright with frame generation on as with it off.A member's screenshot showed "0 of 822 pipelines (0 %)" with no sign of life in step 3 ("Storing them for loading"). - warm: the "N of M in the library" line is printed by time (every 2 s) or every hundredth of the list, whichever comes first, in both into_library and fill_library (was every 500 and 250 pipelines), plus "opening the pipeline library" and "saving the pipeline library" lines. - preload window: the time spent in the step; a line naming the activity (opening the saved library, making pipelines, saving it, a save skipped because another Darner held the library's writer lock); a "still working" note after 60 s with no new count while compile memory lines show the compiles go on. The window now reads the preload's stderr too. - The step-3 hint said Play now keeps what is built; step 3's pipelines are written only when it ends (unless DARNER_PRELOAD_SAVE_EVERY). - The preload's log (its lines and its tracing) goes to <home>\logs\darner-preload-<time>-<pid>.log (five newest kept) instead of nowhere; the path is in the window and printed when it ends. New strings are in locales/en.json only; zh-CN falls back to English. This change was made with AI assistance (Claude Code).0is off where it was read as set or not b89f06df9b`write_sites::apply` takes a file name and a hexadecimal offset from a text file (`DARNER_WRITE_SITES=<file>`) and bounds it with a plain `offset + 16 > size`. `usize::from_str_radix` accepts any `usize`, so an offset in `usize::MAX - 15 ..= usize::MAX` overflows that addition: in the release profiles (release, diag and fast, which inherit it) it wraps to 15, passes the guard, and `base + offset` wraps to `base - 1`; the sixteen bytes read there are below the image's first page and the SAFETY comment on that read ("sixteen bytes inside the image") no longer holds. In the dev profile the guard itself panics. `heap_sites` bounds its own site the way this now does, with `checked_add`, so this is a missed hardening rather than a choice. The test writes a list naming the image at `usize::MAX` and `usize::MAX - 7`; it panics on main ("attempt to add with overflow") and passes here.The environment values are filtered so that empty means unset, and so is `physical_pages_dir` from the file, but the other file fields are not: `[paths] cache_dir = ''` became `PathBuf::from("")`. That is not "the default": `subdir`/`checked_dir` join onto it, and `Path::new("").join("shaders")` is the relative path `shaders`, so every cache write landed in whatever folder darner was started from instead of under `%LOCALAPPDATA%\darner` (it was reproduced with `darner config` and `darner translate --warm` in a scratch folder). The same held for `data_dir`, `game_dir` and an empty entry of `test_titles`. All the file paths are now filtered the way the environment and `physical_pages_dir` already were. A path that is not empty behaves as before.mips: 0description 2efc784b18No test passed `TextureDesc.mips = 0` to `Texture::new`, though that is the D3D12 default ("the whole chain") and the branch that derives the count from the largest side is what every such allocation takes its offsets and its size from: `32 - largest.leading_zeros()` at `texture.rs:1618`. An off-by-one there changes the mip count, and so the size, of every texture described that way, and dropping the `.max(depth3d)` gives a 40-deep volume five mips instead of six. Both terms were pinned only by the comment beside them. The test asks for 64x16 and 16x64 flat textures (seven mips, so the height counts as a side) and a 16x16x64 volume (seven, against the five its face alone would give), and checks that a description naming one mip still gets one. Pure function: no GPU, no title, no fixture.In-place refits of BLASes placed in reused units of the shared BLAS heaps page-faulted on an RX 7900 XTX ("device hung", 0x887A0006) at the barrier after a wave of refits, at addresses just over 32 GiB away from any live allocation (the GPU followed a garbage 32-bit node pointer). Committed BLAS buffers, and heap units never reused, did not fault, and delaying the reuse of units did not help. BLASes built with ALLOW_UPDATE now take committed buffers; the rest stay in the heaps. DARNER_HW_RT_REFIT_COMMITTED=0 places them as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>47d21cd) into pr-xmem-scatter-freed-gathered 637b1dda126a9b0df) 78b42fe12dView 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.