Repository navigation
Conversation
…ger shader heap (xcl-dev#2403) NVIDIA's D3D12 driver reserves 512 MB of VA for the code of the pipelines in use and removes the device past it. `xcl nvprofile install [--mb N]` writes setting 0x001ABC0F for xcl.exe into a profile of XCL's own through NVAPI DRS (elevated, once); `status` reads it, `remove` deletes the profile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
|
Tested on an RTX 4070 Ti SUPER (Ada, 16 GB): Setup
Suite
The command
The limit (#2403's
Both ended in Not tested
Tested and written with Claude Code (Claude Opus 5.5). |
…or pipeline machine code NVIDIA's D3D12 driver keeps 512 MB for the machine code of the pipelines in use and removes the device (0x887a0005) past it. `victory nvprofile [status | install [--mb N] | remove] [--exe NAME]` reads, or writes through NVAPI's driver settings, setting 0x001ABC0F in a profile of its own holding only that setting and the executable. Idea and setting from XCL (xcl-dev/xcl#2590); the code is new. Measured here (RTX 5070 Ti): the driver already ships a profile, "The Culling", for another game's victory.exe, so status reports that profile and install refuses for that name; another name goes with --exe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
By reading only, not run, at
AI use: Claude Code (Claude Opus 5.5) found this; Claude Fable 5.2 rechecked it; checked by a person before posting. |
NVIDIA's D3D12 driver reserves 512 MB of VA for the machine code of the pipelines in use and removes the device (
0x887a0005) when a submission needs more (#2403). Setting0x001ABC0Fin a driver profile raises that reserve; NVIDIA's own profiles use 1 or 2 GiB for big titles. This addsxcl nvprofile, which writes that one setting forxcl.exethrough NVAPI, so users don't have to find it in Profile Inspector. Part of #2403. The measurements are in my comment there.It is opt-in and changes nothing at run time: nothing happens unless the user runs the command. It moves the wall and does not replace using less code (#2526, #1901, #2496).
What is in it
crates/xcl/src/gpu/nvprofile.rs(new):nvapi64.dllthroughnvapi_QueryInterface,NvAPI_DRS_*.installputs the exe into a profile of its own,XCL (xcl-dev), holding only this setting, soremovedeletes exactly that.statusreads what the driver will use. Tests: the NVAPI struct sizes, the command line.crates/xcl/src/main.rs: thexcl nvprofile [status | install [--mb N] | remove]subcommand and its help text.--mbtakes 512 to 4096, default 1024.README.md: one line in the command list.Writing needs an elevated prompt once: without it
NvAPI_DRS_SetSettingreturns-137(NVAPI_INVALID_USER_PRIVILEGE) and nothing is saved, and the command says so. Later unelevated runs get the larger heap, because the driver matches the profile by exe name. Reading needs no elevation.Tested
RTX 3090 24 GB, NVIDIA 621.40, i5-13600K, Windows 11 26300, Rust 1.99.1 (MSVC), debug for the suite, release for the runs.
cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4: 1431 passed, 0 failed, 47 ignored. (In the first rune2efailed only becausecargo build --workspacehad not run yet; after it,e2e: 4 passed.)28
SKIPPEDlines: the wave64 tests (no wave64 on this adapter), per-lane f16/f32 forms refused, and the const-mask case.The new tests:
gpu::nvprofile::tests::struct_sizes_match_nvapi,the_command_line_is_checked: pass.xcl nvprofileunelevated: shows the default 512 MB forxcl.exe.xcl nvprofile installunelevated: refused with the elevation message, exit 1, nothing written.The same module, from NVIDIA: the device is removed when the pipelines in use need more than 512 MB of shader code (0x887a0005) #2403's
shader_code_limit.rswith its own exe put into the profile (elevated install, then an unelevated run): removal at 262 pipelines / 448 MB without the profile, 519 / 888 MB at 1 GiB, 1,028 / 1,760 MB at 2 GiB. Reading NVIDIA's own Fortnite profile gives0x80000000, as Profile Inspector shows.Retail 1.0.2.1 in the world, with and without the profile written by this (same binary
4bf94d0, one copy namedxcl-noprofile.exeso the driver gives it no profile, back to back from the same caches;XCL_DIRECT_DXIL=1 XCL_DRED=1, 480 s, A pressed by script). Compute pipelines precompiled with--used-onlyusing Shaders: --precompile --pipelines also builds a split program's whole form #2551's precompiler, so no compute pipeline was built cold at the world start:xcl nvprofile install --mb 10240x887a0005at 102.5 s, DRED page fault at VA 0x0 with no allocations, then0x80000003)With the profile the title showed the first in-world output on this machine: world audio and on-screen text. But frames were very slow (about 70 in the 400 s after the world start), with green flashes and 17 compute + 8 graphics pipelines still built cold. So this shows the device staying alive, not a playable world. The shader code in use was not counted in these runs.
Regression run
main:
this PR:
The
mainrun was first after the build, and its lower frame count is most likely its cold caches. The code here is not called at run time.Not tested
xcl nvprofile installandremovethroughxcl.exeitself, elevated. The same functions were tested elevated through the test above.AI use
🤖 Generated with Claude Code