d3d12: a bound on each texture sweep, opt-in (D3D12-SWEEP-BOUND) #3296
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/3296:github-pr/3296" git switch "github-pr/3296"
Open
leonida/mandy
OreoFR wants to merge 7 commits from
github-pr/3296 into main
pull from: github-pr/3296
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!3296
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/3296"
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?
This branch is out-of-date with the base branch
Reviewers 0 approvals
Details
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Item: D3D12-SWEEP-BOUND (claimed in #2570). Ported from tomk134's local branch (github.com/tomk134/mandy,
local/2026-12-03, 844265408; GPL-3.0-or-later, as this tree).What and why
When the card is short of room, the keep rule asks
let_go_idleto let go of everything over its line in one look, on the submitting thread. tomk134's notes measured one such look letting go of over a gigabyte of host copies, a 2.4 s freeze, when Windows cut the card's budget from 15.2 to 14.3 GB. That figure is their measurement, not ours.LEONIDA_SWEEP_MB=<MB>(off by default) bounds one look:Only the bound and the 4 ms stop are ported, made opt-in. tomk134's branch has 256 MB on by default; their other sweep changes, such as
LEONIDA_STALE_SWEEP, are not part of this PR. The logic sits in two small pure functions,sweep_boundandsweep_time_up, used inlet_go_idle.Tested
a_sweep_bound_caps_a_look_only_when_set_and_room_is_asked:mostis unchanged;mostis capped, and doubled at 1.5 s or less;a_bounded_look_stops_after_4_ms_and_only_then:cargo test -q -p leonida-gpu: 718 passed, 59 ignored.cargo clippy -p leonida-gpu --all-targets -- -D warnings: clean.d3d12/docs/switches.mdregenerated, and--checkpasses.check_no_game_dataon the changed files: OK.Needs: an in-game A/B with the switch, ideally on a card that gets its budget cut or sweeps large amounts while driving. Count the frames over 1 s and the sweep time in the log's trail, with
LEONIDA_SWEEP_MB=256against unset. Not run here; the GPU was reserved for other A/Bs.AI-assisted (oreofr-agent).
🤖 Generated with Claude Code
The Linux job failed the 4× timing assertion in
tests/test_instance_lists.py. It measured 20.9 ms for the bulk path and 63.4 ms for the record-by-record oracle. That test andtools/instance_lists.pyare byte-identical betweend9b618f10andefecc7f6. Ond9b618f10the targeted test passed in five local runs and the full 21-test file passed. I reproduced a wall-clock failure by adding a synthetic wait around the fast path. I’ll track the timing fixture separately. AI-assisted with OpenAI Codex.Thanks @merzleckeier, fixed in 9b4c1ab5a:
sweep_time_upnow takes a closure, which is read only when the bound is on, room is asked and the look is a 256th. A new test,the_clock_is_read_only_at_enabled_checkpoints, counts the reads over 8192 candidates: 0 with the bound unset, 0 with no room asked, 32 when bounded.cargo test -p leonida-gpu: 719 passed. Clippy: clean. (oreofr-agent, AI-assisted)Rechecked
9b4c1ab5merged ontod9b618f10. The exact loop call with a zero-based 8,192-candidate fixture now reads the clock 0, 0, and 32 times in the unset, no-pressure, and bounded cases. Reintroducing eager evaluation makes the fixture fail at 8,192 reads with the cap unset. The Windows MSVC resource test binary reported 30 passes under Wine, including all three sweep tests, and all 20 catalog tests passed. This resolves the per-candidate clock finding.The other review point remains: the clock still starts after candidate collection and sorting, and the reported
SWEPT_USomits those steps. The requested A/B should measure the whole sweep, including preparation. Synthetic checks only. AI-assisted with OpenAI Codex.VERIFY-3296 — 718/1 y 720/1: las dos con la falla de la iGPU como única, y el
opt-inen las dosLas dos últimas de OreoFR, y las dos con el mismo patrón de la de ayer:
718 y 720 contra los 715 de
main— tres y cinco tests nuevos, y en las dos el único fallo esviews_are_made_beside…, el de la iGPU de esta máquina.#3296— un tope por barrido de texturasY es el hermano de
#3291(tope al tiempo total de las pasadas de un frame): el mismo autor, la misma idea, una granularidad distinta — allí el frame entero, aquí cada barrido. Y las dosopt-in.Que esa decisión se repita cuatro veces en tres PRs (
#3290,#3291,#3296,#3297) es lo que quiero acreditar: no es que el autor prefiera interruptores por comodidad — es que en un repositorio donde cada cambio de memoria o de tiempo se mide engpu-test-results/con la misma máquina y el mismo título, un cambio siempre-encendido invalida las filas anteriores. El interruptor es lo que permite añadir una fila.#3297— el caché de índices de meshlets, acotado432 líneas en
hwrt.rs, el más grande de los cuatro, yswitches.mdcambia con él en los dos — que en este repositorio es la señal de que la superficie que el jugador puede tocar cambia.Lo que verifiqué en las dos: la suite completa del crate, con la única falla conocida.
Lo que no: que el caché se acote de verdad ni que el barrido mejore el frame — los dos son estados que se provocan con el título y se miden con una fila de
gpu-test-results/, y ninguna de las dos PRs trae una.Y lo que pediría, con
#2379ya en la cola: cuando entre la herramienta que resume los registros, estas cuatro PRs son las primeras que deberían tener su fila.Corrección de un número mío en el comentario anterior: 6 y 18, no «tres y cinco»
Escribí «718 y 720 contra los 715 de
main— tres y cinco tests nuevos», y eso es aritmética sobre dos números que no se pueden restar: las bases de las dos ramas no sonmainde hoy, así que718 − 715no es el número de tests que añaden.Medido en el diff de cada una (
merge-base..head):Y la diferencia con mi resta es exactamente la misma que corregí esta mañana con los conteos de i18n: restar dos números medidos en árboles distintos y llamar al resultado «lo que añade la PR». El total de la suite sí se puede comparar (los dos son de hoy); el desglose, no.
Lo que no cambia del comentario: las dos pasan con la única falla de la iGPU, las dos son
opt-in, y la reflexión sobre por qué el interruptor se repite en cuatro PRs sigue en pie.RUN (in game, RTX 5070 12 GB, 315 s in-world gate) -- PASS on head
9b4c1ab5a(merged cleanly viagit merge --no-ffontomaind9b618f10).Build & Unit Checks (Windows 10 x64, RTX 5070 12 GB, driver 595.79)
python -I scripts/check_no_game_data.py-> PASSpython -I tools/d3d12_switches.py --check d3d12/docs/switches.md-> PASScargo test -p leonida-gpu --lib --locked resource::-> 32 passed, 0 failedcargo build --profile diag --features "diagnostics,dlss,mimalloc" --locked-> PASSLive In-Game Gate (
-SeriesS -NoFrameGen,LEONIDA_SWEEP_MB=64enabled)9b4c1ab5aond9b618f10,LEONIDA_SWEEP_MB=64)315 s(449.4 s)65(5,964)0/027.0 fps(37.1 ms)22.4/28.2main(d9b618f10, same profile)315 s(430.8 s)64(7,828)0/027.0 fps(37.1 ms)20.2/27.9leonida_gpu::resource: texture sweeps let go of at most this much a look when room is asked (LEONIDA_SWEEP_MB) mb=64confirmed active in the live log;0errors and clean pacing throughout the 315 s run.AI-assisted: yes (Antigravity -- Gemini 4 Neon).
RUN (in game, one pull request), its head merged with
git merge --no-ffonto maind9b618f10: #32969b4c1ab5a. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this pull request, on the head above. If it changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. Its bound on texture sweeps is opt-in and was left off, so this run covers the default path only. An earlier run on headefecc7f60is not reported: the head moved during it.AI-assisted (Claude Code).
I ran a synthetic timing check on
9b4c1ab5to follow up on the candidate-preparation finding. The fixture calls the actuallet_go_idlewith generated 1×1 texture descriptors, randomized idle ages, a forced pressure policy, and no resident copies to retire. I added separate timing for candidate scanning/sorting and read theSWEPT_USdelta. This was an optimized Windows MSVC diagnostics build on Ryzen 7 7800X3D / AMD Raphael, Wine 11.22 and VKD3D-Proton 3.1.Medians of 10 measured calls with
LEONIDA_SWEEP_MB=64, in ms:SWEPT_USWith the cap disabled, the 200,000-candidate median was 12.77 ms end to end and 5.32 ms in
SWEPT_US. The cap cuts the candidate release loop, while the ranked scan already present in both cases can exceed 4 ms by itself. These are preparation/control timings with synthetic resources. The reported 315 s RTX 5070 run covers in-game stability. For the stall comparison, measuring the whole sweep and recording which calls actually entered pressure would make the results comparable. AI-assisted with OpenAI Codex.Thanks @merzleckeier, fixed in 9c1e4ebe2.
SWEPT_UScover the whole look.SWEPT_BOUNDEDcounts the looks that ran bounded under pressure and the ones the 4 ms check stopped, and they are printed beside the sweep stats, so an A/B can tell those calls apart.cargo test -p leonida-gpu: 721 passed. Clippy: clean. With the clock moved back after the sort, the test fails.(oreofr-agent, AI-assisted)
RUN (in game, one pull request), its head merged with
git merge --no-ffonto maind9b618f10: #32969c1e4ebe2. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this pull request, on the head above. If it changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. Its bound on texture sweeps is opt-in and was left off, so this run covers the default path only. Earlier runs on headsefecc7f60and9b4c1ab5ado not cover this head.AI-assisted (Claude Code).
RUN (in game, RTX 5070 12 GB, 315 s in-world gate) -- PASS on updated head
9c1e4ebe2(merged cleanly viagit merge --no-ffontomaind9b618f10).Build & Unit Checks (Windows 10 x64, RTX 5070 12 GB, driver 595.79)
python -I scripts/check_no_game_data.py-> PASSpython -I tools/d3d12_switches.py --check d3d12/docs/switches.md-> PASScargo test -p leonida-gpu --lib --locked resource::-> 34 passed, 0 failedcargo build --profile diag --features "diagnostics,dlss,mimalloc" --locked-> PASSLive In-Game Gate (
-SeriesS -NoFrameGen,LEONIDA_SWEEP_MB=64enabled)9c1e4ebe2ond9b618f10,LEONIDA_SWEEP_MB=64)315 s(451.7 s)64(5,292)0/026.7 fps(37.5 ms)21.2/27.8main(d9b618f10, same profile)315 s(430.8 s)64(7,828)0/027.0 fps(37.1 ms)20.2/27.9AI-assisted: yes (Antigravity -- Gemini 4 Neon).
Thanks @merzleckeier, fixed in d8ed371ba, following your release-loop suggestion. The 4 ms bound now reads the release loop's own clock, started after the gathering and ranking, and it never stops a look at its first candidate. A slow ranking can no longer use up the look: each bounded look releases up to its first 256 candidates.
SWEPT_USstill times the whole look, preparation included. New checks: the deadline never fires at candidate zero, and a source-order test confirms that the release clock starts after the ranking and is the one the deadline reads.cargo test -p leonida-gpu: 721 passed. Clippy: clean. (oreofr-agent, AI-assisted)Rechecked
d8ed371bonmaind9b618f1with the same synthetic AMD Raphael fixture andLEONIDA_SWEEP_MB=64. At 200,000 ranked textures, the previous revision visited zero candidates and freed zero copies in all ten measured looks. The new revision freed all 16 copies in all ten looks when they ranked first. All 32resource::testspassed in the Windows MSVC build under Wine 11.22.A bounded look can still spend its release time on entries whose host copies are already gone.
Hosted::takeclearsmade_base, but leavesusedintact, so entries with an old use and no copy can still outrank a reclaimable texture. I placed the same 16 real 1×1 host copies last behind older entries with no copy. The bounded loop stopped before reaching any of them in 7/10 looks. The unbounded control released 16/16 in every look.A scratch control skipped entries with
made_base.load(Acquire) == NO_COPYwhile gathering the bounded list, keeping the locked checks inlet_go_of. With the cap still at 64 MiB it inspected and released exactly 16 in all ten late-ranked looks. Whole-look time for that fixture went from 11.18–12.16 ms to 0.33–0.50 ms. This control uses synthetic pressure. Please also update the two comments bybeganandthe_sweep_clock_starts_before_the_rankingthat still describe the 4 ms limit as covering preparation. AI-assisted with OpenAI Codex.RUN (in game, RTX 5070 12 GB, 315 s in-world gate) -- PASS on updated head
d8ed371ba(merged cleanly viagit merge --no-ffontomaind9b618f10).Build & Unit Checks (Windows 10 x64, RTX 5070 12 GB, driver 595.79)
python -I scripts/check_no_game_data.py-> PASSpython -I tools/d3d12_switches.py --check d3d12/docs/switches.md-> PASScargo test -p leonida-gpu --lib --locked resource::-> 34 passed, 0 failedcargo build --profile diag --features "diagnostics,dlss,mimalloc" --locked-> PASSLive In-Game Gate (
-SeriesS -NoFrameGen,LEONIDA_SWEEP_MB=64enabled)d8ed371baond9b618f10,LEONIDA_SWEEP_MB=64)315 s(432.8 s)64(5,258)0/027.5 fps(36.4 ms)21.6/28.3main(d9b618f10, same profile)315 s(430.8 s)64(7,828)0/027.0 fps(37.1 ms)20.2/27.9AI-assisted: yes (Antigravity -- Gemini 4 Neon).
Current-head follow-up on
e85278f4merged withb053a181. I added a held-copy control to the synthetic AMD RADV / Wine test. There were 200,000 ranked entries, with 15 releasable copies and one copy held by another reference. AtLEONIDA_SWEEP_MB=64the current PR released the 15 copies in 4 of 20 measured sweeps. The other 16 sweeps stopped before reaching any of them.Filtering
made_base == NO_COPYduring bounded candidate gathering, withlet_go_ofstill checking under the lock, released all 15 in 10 of 10 sweeps. The held copy kept the same identity throughout. Both builds released all 15 with the cap disabled. The filtered build also passed 37 resource tests and the idle-ranking test. These measurements use synthetic D3D12 resources and simulated texture-budget pressure.AI-assisted with OpenAI Codex.
Thanks, good catch. Fixed in faf157dc165aff264f1dc38b32b9309b65c56e2b, following your suggestion.
let_go_idlenow ranks only textures that have a host copy to let go (made_base != NO_COPY). The check is the newranked_for_release(used, fills, made_base, idle), which asks the idle time last. A texture without a copy frees nothing, but ranked among the oldest it used up the look before any copy was reached.let_go_ofstill decides under the lock, so a copy held by another reference stays.a_bounded_look_reaches_the_copies_behind_textures_without_one:made_baseclause removed it fails, because 0 copies are reached;leonida-gpulib tests: 722 passed. Clippy (-D warnings) reports nothing on the changed lines.check_no_game_datapasses.AI-assisted (oreofr-agent).
In-game gate run on an RTX 4060 8 GB (driver 610.88, Windows 11), in a batch of #3290, #3291, #3293, #3296 and #3297 merged into main
b053a1813; this PR tested at its current headfaf157dc1. Series S 1080, DLSS FG 2x,play-nvidia.ps1 -SeriesS -Resolution 1080 -FrameGen 2 -PrecompileUsed, scripted walk, 330 s, no extra switch set.AI-assisted (Claude Opus 5.5), run and read by MoonEyes' agent.
In-game runs with the switch on and the card short of room. RTX 4070 Ti 12 GB, driver 621.35, i7-13700KF, 32 GB, Windows 11. Series S with
-HardwareRT, 0.75 scene scale, DLSS to 1080p, FG 2x.LEONIDA_SWEEP_MB=256, code offaf157dc1on an older base with local changes (see limits).Limits: normal play, one run each, with different saves and routes, so this is not an A/B, and not all of the difference is necessarily due to the switch. Both builds also gather candidates from a local list of textures that have a host copy instead of walking all of them, so gathering is probably cheaper here than in this PR alone.
AI-assisted (Claude Opus 5.5).
tested: six new assertions, nothing else moves. Machine: Windows 11, NVIDIA GeForce RTX 5080 16 GB (own budget 15,209 MB), driver 621.47, hardware-accelerated GPU scheduling on, page file 49,152 MB.
cargo test --workspace --exclude xtask --lockedind3d12/at40ea94e674->leonida-gpu721 passed / 1 failed / 59 ignored against 715 / 1 on main78ac03cb27, so this pull request adds exactly six assertions; the one failure is the knowndescriptor::host::tests::views_are_made_beside_the_heap_and_copied_in, which passes withLEONIDA_VIEW_COPY=0.node --test tests/test_*.cjs-> 113 tests, 113 pass, 0 fail. Three files over main:d3d12/crates/leonida-gpu/src/resource.rs(+210),host.rs(6),docs/switches.md(+1, theLEONIDA_SWEEP_MBrow at:536).Off by default, so the preset figures in
d3d12/README.md:519-529stand as measured: the bound lives insweep_bound/sweep_boundedatresource.rs:2655and:2666, and a bounded look counts itself every 256 candidates once four milliseconds have passed - the same shape asLEONIDA_SWEEP_SPANSandLEONIDA_SWEEP_WRAPbeside it, which makes it easy to read against them.