GPU: a changed heap slot's view census costs ~25% less of its mirror (#3425) #3522

Open
github-bot wants to merge 1 commit from github-bot/gh-3522 into main AGit
Owner

@⁠KainanP on GitHub · 2026-11-27 13:37 UTC · original
KainanP:perf/mirror-census → main · +276 −47 · 2 files · 1 commits · open

Part of #3425, the "Descriptor heap mirroring (384k slots), 18.1 ms, HostHeap::sync_slots" row.

Where a changed slot's ~1 µs goes

I timed each step of HostHeap::mirror (serialized rdtsc, temporary, not in this PR) in the sync_slots_bench shape from my #3425 comment: 393k slots a frame, ~9.5k changed, 1/8 null views, 1/8 constant buffers, 6/8 placed buffer views. That's the "other" mix #3233 measured in the world, where 68 % of the views made are constant buffers and memory views. Per changed slot on main, RTX 4060 Laptop:

step ns
bindless::Viewed::set (the census of what slots view) ~480-690
of which the slot HashMap insert/remove ~290
of which counting the old range out (BTreeMap entry + remove, tallies, hull rebuilt with an Arc clone) ~360 (non-serialized)
make (buffer_srv) ~310
of which CreateShaderResourceView ~100-140
keep (+ host::retire of the old resource) ~100
made/VIEWS locks and view_at ~60-100
prepare ~50
stride/address/mark tables ~35

The driver call is only about 10 % of the cost. A host-descriptor cache that turns Create*View into CopyDescriptorsSimple would save at most ~100 ns of the ~1 µs. The largest single cost is the census bookkeeping.

Change

  • Viewed.slots: a HashMap<u32, Seen> holding the heap's ~600k-1M slots (2^20-2^21 buckets) is replaced by pages of 1024 entries indexed by slot, created when a slot in them is first set. That is one memory access instead of hash probes that miss the cache, and it uses less memory once a heap is mostly set (32 B per slot vs ~37 B per bucket at 2x capacity).
  • Inner::count:
    • Range counts are a HashMap. Their order was only read by the diagnostics census, which now sorts before dedup.
    • Counts and start/end tallies take one lookup each (entry API instead of entry + remove).
    • The new view is counted before the old one goes, so a slot rewritten with the same range never drops to 0 and does no hull work.
    • A copy's hull is updated in place instead of being rebuilt with an Arc clone. The key's copy is the same object while ends holds it.
  • HostHeap::keep: when the slot gets a view of the resource it already holds, the old reference is not retired. Most buffer views sit on a few host copies. The slot still holds the resource, and any later change retires it as before, so it is freed only after the submissions in flight have run. This drops the RETIRED lock and one extra reference per slot until the next submission.

There is no change in what is made. The census's hulls, ranges and textures are identical.

Bench

sync_slots_bench from bench/sync-slots (f233390e), base = main 63bcca4. I ran 7 interleaved runs per tree, 20 frames each, and report medians with [min-max] across runs. RTX 4060 Laptop, Windows. The measured tree is bench/mirror-fix, whose code is this PR's before rustfmt.

changed slots/frame title threads main this PR title wait/frame
0 0 1.86 ms [1.60-2.10] 1.87 ms [1.57-2.08] ×1.01
0 5 1.88 ms [1.78-2.20] 1.92 ms [1.84-2.61] ×1.02 9.8 → 10.1 ms
~9.5k 0 10.82 ms [10.25-15.15] 8.50 ms [7.72-8.83] ×0.79
~9.5k 5 10.52 ms [10.06-14.55] 9.01 ms [8.45-9.89] ×0.86 53.8 → 45.2 ms
~85k 0 86.3 ms [69.8-106.2] 50.8 ms [46.6-56.5] ×0.59
~85k 5 94.3 ms [70.0-113.9] 67.2 ms [46.8-75.7] ×0.71 450 → 327 ms
  • A changed slot's mirror drops from ~0.94 µs to ~0.70 µs (−25 %). With more changed slots the gain grows (×0.59), because the old slot map's misses get worse as it fills.
  • Scanning unchanged slots is unchanged.
  • All 42 runs: 0 slots lost after a sync, 0 stale at the end. The bench checks every changed slot after each sync and every slot at the end.

Share of the in-game 18.1 ms row: roughly 3 ms of the 18.1 ms is the scan, so if the other ~15 ms is changed-slot mirrors like these, this should take off about 3-4 ms (~20 %). The same mirror also runs for descriptor copies with new records (borosf's "heap slots the title copied" row) and for draws' make_read. @⁠neonbyte1 (or anyone with the world loaded), could you A/B the frame line's heap sync on main vs this branch?

Tests

  • New: bindless::tests::slots_keep_what_each_index_sees covers set, replace, clear and retain across page boundaries, including a far slot that doesn't create the pages before it.
  • Extended: hulls_follow_the_ranges now also covers a slot rewritten with its own range, a range inside the hull, ranges sharing a start, the first start going and the far end going.
  • New: descriptor::host::tests::a_slot_made_again_on_its_resource_retires_nothing. It fails on main ("the same buffer again": 1 retire instead of 0) and checks that a view of another buffer and a null view still retire the old one.
  • cargo test -p victory-gpu --lib, results identical to main:
    • RTX 4060: 231 passed. The only failures are main's known dynamic_slots_are_held_until_released and lists_share_a_table_and_copies_keep_their_views; I skipped heap_direct_texture_reads_mark_their_heap_index, which crashes on main.
    • Intel UHD (local adapter hook): 230 passed. Same three failures as main with the hook (3/3 runs on main too): the two above plus a_texture_written_in_one_format_reads_in_another_through_a_placed_view.
    • WARP (--features diagnostics, VICTORY_D3D12_WARP=1): 248 passed, 0 failed.
  • cargo clippy -p victory-gpu --all-targets -D warnings, default and --all-features: clean. cargo xtask policy: ok. rustfmt applied to the changed lines only.

Overlaps

  • It merges cleanly with #3139, #3265, #2821, #3233, #3234, #3215 and #3288.
  • Small textual conflicts in Viewed::set with #3055 (set_with/set_batch) and #3213 (liveness re-check), and in descriptor::host::tests with #2895. Each resolves by keeping both sides, with Inner::put replacing the remove/insert pair. I'm happy to rebase on whichever lands first.

AI use: profiled, written, tested and benchmarked with Claude Code (Claude Opus 5.5).

🤖 Generated with Claude Code

**@⁠KainanP** on GitHub · 2026-11-27 13:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/3522) `KainanP:perf/mirror-census` → `main` · +276 −47 · 2 files · 1 commits · open Part of #3425, the "Descriptor heap mirroring (384k slots), 18.1 ms, `HostHeap::sync_slots`" row. ## Where a changed slot's ~1 µs goes I timed each step of `HostHeap::mirror` (serialized `rdtsc`, temporary, not in this PR) in the `sync_slots_bench` shape from my [#3425 comment](https://git.gtahub.st/github/Marvisak--VIctory/issues/3425): 393k slots a frame, ~9.5k changed, 1/8 null views, 1/8 constant buffers, 6/8 placed buffer views. That's the "other" mix #3233 measured in the world, where 68 % of the views made are constant buffers and memory views. Per changed slot on `main`, RTX 4060 Laptop: | step | ns | |---|---| | `bindless::Viewed::set` (the census of what slots view) | **~480-690** | | of which the slot `HashMap` insert/remove | ~290 | | of which counting the old range out (`BTreeMap` entry + remove, tallies, hull rebuilt with an `Arc` clone) | ~360 (non-serialized) | | `make` (`buffer_srv`) | ~310 | | of which `CreateShaderResourceView` | ~100-140 | | `keep` (+ `host::retire` of the old resource) | ~100 | | made/`VIEWS` locks and `view_at` | ~60-100 | | `prepare` | ~50 | | stride/address/mark tables | ~35 | The driver call is only about 10 % of the cost. A host-descriptor cache that turns `Create*View` into `CopyDescriptorsSimple` would save at most ~100 ns of the ~1 µs. The largest single cost is the census bookkeeping. ## Change - **`Viewed.slots`**: a `HashMap<u32, Seen>` holding the heap's ~600k-1M slots (2^20-2^21 buckets) is replaced by pages of 1024 entries indexed by slot, created when a slot in them is first set. That is one memory access instead of hash probes that miss the cache, and it uses less memory once a heap is mostly set (32 B per slot vs ~37 B per bucket at 2x capacity). - **`Inner::count`**: - Range counts are a `HashMap`. Their order was only read by the `diagnostics` census, which now sorts before `dedup`. - Counts and start/end tallies take one lookup each (entry API instead of entry + remove). - The new view is counted before the old one goes, so a slot rewritten with the same range never drops to 0 and does no hull work. - A copy's hull is updated in place instead of being rebuilt with an `Arc` clone. The key's copy is the same object while `ends` holds it. - **`HostHeap::keep`**: when the slot gets a view of the resource it already holds, the old reference is not retired. Most buffer views sit on a few host copies. The slot still holds the resource, and any later change retires it as before, so it is freed only after the submissions in flight have run. This drops the `RETIRED` lock and one extra reference per slot until the next submission. There is no change in what is made. The census's hulls, ranges and textures are identical. ## Bench `sync_slots_bench` from [`bench/sync-slots`](https://github.com/KainanP/VIctory/commits/bench/sync-slots) (`f233390e`), base = `main` `63bcca4`. I ran 7 interleaved runs per tree, 20 frames each, and report medians with [min-max] across runs. RTX 4060 Laptop, Windows. The measured tree is [`bench/mirror-fix`](https://github.com/KainanP/VIctory/commits/bench/mirror-fix), whose code is this PR's before rustfmt. | changed slots/frame | title threads | `main` | this PR | | title wait/frame | |---|---|---|---|---|---| | 0 | 0 | 1.86 ms [1.60-2.10] | 1.87 ms [1.57-2.08] | ×1.01 | | | 0 | 5 | 1.88 ms [1.78-2.20] | 1.92 ms [1.84-2.61] | ×1.02 | 9.8 → 10.1 ms | | ~9.5k | 0 | 10.82 ms [10.25-15.15] | **8.50 ms** [7.72-8.83] | **×0.79** | | | ~9.5k | 5 | 10.52 ms [10.06-14.55] | **9.01 ms** [8.45-9.89] | **×0.86** | 53.8 → 45.2 ms | | ~85k | 0 | 86.3 ms [69.8-106.2] | **50.8 ms** [46.6-56.5] | **×0.59** | | | ~85k | 5 | 94.3 ms [70.0-113.9] | **67.2 ms** [46.8-75.7] | **×0.71** | 450 → 327 ms | - A changed slot's mirror drops from ~0.94 µs to ~0.70 µs (−25 %). With more changed slots the gain grows (×0.59), because the old slot map's misses get worse as it fills. - Scanning unchanged slots is unchanged. - All 42 runs: 0 slots lost after a sync, 0 stale at the end. The bench checks every changed slot after each sync and every slot at the end. **Share of the in-game 18.1 ms row:** roughly 3 ms of the 18.1 ms is the scan, so if the other ~15 ms is changed-slot mirrors like these, this should take off about 3-4 ms (~20 %). The same `mirror` also runs for descriptor copies with new records (borosf's "heap slots the title copied" row) and for draws' `make_read`. **@⁠neonbyte1** (or anyone with the world loaded), could you A/B the frame line's heap sync on `main` vs this branch? ## Tests - New: `bindless::tests::slots_keep_what_each_index_sees` covers set, replace, clear and retain across page boundaries, including a far slot that doesn't create the pages before it. - Extended: `hulls_follow_the_ranges` now also covers a slot rewritten with its own range, a range inside the hull, ranges sharing a start, the first start going and the far end going. - New: `descriptor::host::tests::a_slot_made_again_on_its_resource_retires_nothing`. It **fails on `main`** ("the same buffer again": 1 retire instead of 0) and checks that a view of another buffer and a null view still retire the old one. - `cargo test -p victory-gpu --lib`, results identical to `main`: - RTX 4060: 231 passed. The only failures are `main`'s known `dynamic_slots_are_held_until_released` and `lists_share_a_table_and_copies_keep_their_views`; I skipped `heap_direct_texture_reads_mark_their_heap_index`, which crashes on `main`. - Intel UHD (local adapter hook): 230 passed. Same three failures as `main` with the hook (3/3 runs on `main` too): the two above plus `a_texture_written_in_one_format_reads_in_another_through_a_placed_view`. - WARP (`--features diagnostics`, `VICTORY_D3D12_WARP=1`): 248 passed, 0 failed. - `cargo clippy -p victory-gpu --all-targets -D warnings`, default and `--all-features`: clean. `cargo xtask policy`: ok. rustfmt applied to the changed lines only. ## Overlaps - It merges cleanly with #3139, #3265, #2821, #3233, #3234, #3215 and #3288. - Small textual conflicts in `Viewed::set` with #3055 (`set_with`/`set_batch`) and #3213 (liveness re-check), and in `descriptor::host::tests` with #2895. Each resolves by keeping both sides, with `Inner::put` replacing the remove/insert pair. I'm happy to rebase on whichever lands first. _AI use: profiled, written, tested and benchmarked with Claude Code (Claude Opus 5.5)._ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
HostHeap::mirror of a changed slot took ~0.95-1.1 us in the #3425
sync_slots shape, about half of it in bindless::Viewed::set:

- What each slot sees was a HashMap of the heap's ~600,000-1,000,000 slots
  (2^20-2^21 buckets); its insert missed the caches, ~290 ns. Slots now
  index pages of 1024 entries made on first use (one access, and smaller
  than the map once a heap is mostly set).
- The range counts are a hash map (their order was only read by a
  diagnostic, now sorted there); the counts and the start/end tallies take
  one lookup each (entry API instead of entry + remove); the new view is
  counted before the old goes (a slot rewritten with its range does no
  hull work); a copy's hull is updated in place, not rebuilt with an Arc
  clone.
- HostHeap::keep no longer retires a resource the slot holds again (most
  buffer views are on a few host copies): no retired-list lock, no extra
  reference until the next submission.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 13:49:01 +00:00
Author
Owner

@⁠oni-swr on GitHub · 2026-11-27 14:17 UTC · original

Independent verification of babd4873 (base 63bcca4), claimed in #1633. WARP + CPU only.

Environment: AMD Ryzen 7 5700X3D (8C/16T), Windows 11 25H2 build 10.0.26200.9974, rustc/cargo 1.98.1, VICTORY_WARP=1 + VICTORY_D3D12_WARP=1, --features diagnostics, system WARP d3d10warp.dll 10.0.26100.9818. No physical GPU. The machine was shared with other verification builds, so absolute times are noisy; the runs were interleaved base/head.

Trees: base = 63bcca4; head = babd4873. Both plus KainanP's bench commits f34bcfb + f233390 (cherry-picked; they only add #[ignore]d tests and a 1-line change).

Tests (cargo test -p victory-gpu --lib --features diagnostics -- bindless descriptor --test-threads=1):

  • base: 26 passed, 0 failed, 3 ignored (the benches).
  • head: 28 passed, 0 failed, 3 ignored. The two extra are the PR's new bindless::tests::slots_keep_what_each_index_sees and descriptor::host::tests::a_slot_made_again_on_its_resource_retires_nothing; hulls_follow_the_ranges (extended) passes. I did not re-run the "fails on main" claim for the retire test, and did not run the whole victory-gpu lib.

Bench (sync_slots_bench, --release, 7 interleaved runs per tree, 20 frames each, WARP device). ns per changed slot = (median frame − the same run's 0-changed median) / changed slots; median over the 7 runs:

changed/frame title threads base head head/base
~9.5k 0 4230 ns (frame 42.0 ms) 3718 ns (37.6 ms) x0.88
~9.5k 5 4149 ns (42.8 ms) 3860 ns (39.0 ms) x0.93
~85k 0 3901 ns (334 ms) 3506 ns (301 ms) x0.90
~85k 5 3937 ns (338 ms) 3519 ns (302 ms) x0.89
0 0 / 5 2.0 / 3.0 ms 2.1 / 2.2 ms within noise

Ranges across runs do not overlap in the 0-thread rows (9.5k: base 40.5-43.6 ms, head 37.0-42.1 ms). 0 slots lost / 0 stale in all 14 runs. Saving is about 0.4-0.5 us per changed slot, which matches the PR's ~0.24 us absolute saving per slot up to the larger per-view cost here: on WARP CreateShaderResourceView is a software call, so the whole slot costs ~4 us and the census saving is a ~10% share, not 25%. It says the direction holds on a second CPU; it does not confirm the 25% on a hardware driver.

Diff read (bindless.rs, host.rs): no correctness problem found.

  • put counts the new view in before the old one out. Final counts are identical to remove-then-add; a same-range rewrite no longer hits 0, so no hull work. Different ranges are unaffected.
  • count: the single-lookup entry paths match the old behaviour: a decrement of a missing range is a no-op (old: saturating_sub on a fresh 0), tally never underflows because entries are removed at 0. The hull is rebuilt only when a range comes or goes, as before.
  • In-place hull update keeps the old Arc; safe because the key is the copy's pointer and ends holds that Arc while any range for it exists; the hull and ends entries are removed together. dirty_bit is still refreshed.
  • HashMap ranges: order was only used by diagnostics; it now sorts before dedup (needed, and done).
  • Slots: pages of 1024; retain does not count ranges down, same as the old retain on textures. Notes only: a page is never freed once created, and a bogus huge slot index would size the page vector by index/1024 (heap indices are bounded, so fine).
  • keep: skipping the retire when the slot's new resource is the same object is safe: the slot still holds it, and its later replacement retires it after submissions in flight at that time.

AI-assisted: Claude Code, Claude Sonnet 5.5.

**@⁠oni-swr** on GitHub · 2026-11-27 14:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/3522#issuecomment-7220591097) Independent verification of babd4873 (base 63bcca4), claimed in #1633. WARP + CPU only. **Environment:** AMD Ryzen 7 5700X3D (8C/16T), Windows 11 25H2 build 10.0.26200.9974, rustc/cargo 1.98.1, `VICTORY_WARP=1` + `VICTORY_D3D12_WARP=1`, `--features diagnostics`, system WARP `d3d10warp.dll` 10.0.26100.9818. No physical GPU. The machine was shared with other verification builds, so absolute times are noisy; the runs were interleaved base/head. **Trees:** base = `63bcca4`; head = `babd4873`. Both plus KainanP's bench commits `f34bcfb` + `f233390` (cherry-picked; they only add `#[ignore]`d tests and a 1-line change). **Tests** (`cargo test -p victory-gpu --lib --features diagnostics -- bindless descriptor --test-threads=1`): - base: 26 passed, 0 failed, 3 ignored (the benches). - head: 28 passed, 0 failed, 3 ignored. The two extra are the PR's new `bindless::tests::slots_keep_what_each_index_sees` and `descriptor::host::tests::a_slot_made_again_on_its_resource_retires_nothing`; `hulls_follow_the_ranges` (extended) passes. I did not re-run the "fails on main" claim for the retire test, and did not run the whole `victory-gpu` lib. **Bench** (`sync_slots_bench`, `--release`, 7 interleaved runs per tree, 20 frames each, WARP device). ns per changed slot = (median frame − the same run's 0-changed median) / changed slots; median over the 7 runs: | changed/frame | title threads | base | head | head/base | |---|---|---|---|---| | ~9.5k | 0 | 4230 ns (frame 42.0 ms) | 3718 ns (37.6 ms) | x0.88 | | ~9.5k | 5 | 4149 ns (42.8 ms) | 3860 ns (39.0 ms) | x0.93 | | ~85k | 0 | 3901 ns (334 ms) | 3506 ns (301 ms) | x0.90 | | ~85k | 5 | 3937 ns (338 ms) | 3519 ns (302 ms) | x0.89 | | 0 | 0 / 5 | 2.0 / 3.0 ms | 2.1 / 2.2 ms | within noise | Ranges across runs do not overlap in the 0-thread rows (9.5k: base 40.5-43.6 ms, head 37.0-42.1 ms). 0 slots lost / 0 stale in all 14 runs. Saving is about 0.4-0.5 us per changed slot, which matches the PR's ~0.24 us absolute saving per slot up to the larger per-view cost here: on WARP `CreateShaderResourceView` is a software call, so the whole slot costs ~4 us and the census saving is a ~10% share, not 25%. It says the direction holds on a second CPU; it does not confirm the 25% on a hardware driver. **Diff read (bindless.rs, host.rs):** no correctness problem found. - `put` counts the new view in before the old one out. Final counts are identical to remove-then-add; a same-range rewrite no longer hits 0, so no hull work. Different ranges are unaffected. - `count`: the single-lookup entry paths match the old behaviour: a decrement of a missing range is a no-op (old: `saturating_sub` on a fresh 0), `tally` never underflows because entries are removed at 0. The hull is rebuilt only when a range comes or goes, as before. - In-place hull update keeps the old `Arc`; safe because the key is the copy's pointer and `ends` holds that Arc while any range for it exists; the hull and `ends` entries are removed together. `dirty_bit` is still refreshed. - `HashMap` ranges: order was only used by `diagnostics`; it now sorts before `dedup` (needed, and done). - `Slots`: pages of 1024; `retain` does not count ranges down, same as the old `retain` on textures. Notes only: a page is never freed once created, and a bogus huge slot index would size the page vector by `index/1024` (heap indices are bounded, so fine). - `keep`: skipping the retire when the slot's new resource is the same object is safe: the slot still holds it, and its later replacement retires it after submissions in flight at that time. AI-assisted: Claude Code, Claude Sonnet 5.5.
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-27 14:18 UTC · original

@⁠KainanP yes, happy to. I'm merging it onto our test stack now (it carries a few heap-sync changes of its own in descriptor/host.rs: the sync holds the heaps' lock a chunk of pages at a time, stops at the host heap's count (#3512), and skips the view lookup for unchanged slots), and it'll get an in-game A/B against an adjacent control, judged on the frame line's heap-sync time and slot counts first and frame time second. Our GPU queue is booked for the next couple of hours, so expect the numbers later today; I'll post them here.

AI-assisted (Claude); measured on my machine, no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-27 14:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/3522#issuecomment-7220625886) @⁠KainanP yes, happy to. I'm merging it onto our test stack now (it carries a few heap-sync changes of its own in `descriptor/host.rs`: the sync holds the heaps' lock a chunk of pages at a time, stops at the host heap's count (#3512), and skips the view lookup for unchanged slots), and it'll get an in-game A/B against an adjacent control, judged on the frame line's heap-sync time and slot counts first and frame time second. Our GPU queue is booked for the next couple of hours, so expect the numbers later today; I'll post them here. _AI-assisted (Claude); measured on my machine, no game data shared._
Author
Owner

@⁠pickles976 on GitHub · 2026-11-27 14:21 UTC · original

Physical Wine/NVIDIA correctness check of exact clean head babd487363e56203efae1b02850884c446271c2e (base 63bcca4). RTX 4060 Laptop 8 GiB, NVIDIA 590.48.1, Wine 11.0, vkd3d-proton diagnostic build 2576c0b4adfae4a+ (relaxed-vtable; not stock certification), Rust 1.98.1 MSVC target, dxgi.hideNvidiaGpu = False, one test thread.

Fresh intended-worktree compilation was confirmed (Compiling victory-gpu .../VIctory-pr3522/crates/victory-gpu, 9.31 s). Focused results:

  • bindless::tests::slots_keep_what_each_index_sees: 1/1 pass — page boundary, far sparse page, replace/retain/remove.
  • bindless::tests::hulls_follow_the_ranges: 1/1 pass — actual RTX/vkd3d device initialized; no skip line; same-range rewrite and start/end/inside hull transitions all completed.
  • descriptor::host::tests::a_slot_made_again_on_its_resource_retires_nothing: 1/1 pass — actual RTX/vkd3d device initialized; same resource was not retired, replacement and null each retired once.

Total focused result: 3 passed, 0 failed, 0 ignored. No source edits, no title launch. I did not port the new retirement fixture to the parent, run the full library, or benchmark this host, so this confirms the changed ownership/range behavior on physical Wine/NVIDIA but not the claimed 25%/frame-time saving or a RAM-floor improvement.

Evidence: .compat-runtime/logs/verify-pr3522-changed-slot-fixtures.log.

AI-assisted verification; review-only, no code contribution.

**@⁠pickles976** on GitHub · 2026-11-27 14:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/3522#issuecomment-7220687361) Physical Wine/NVIDIA correctness check of exact clean head `babd487363e56203efae1b02850884c446271c2e` (base `63bcca4`). RTX 4060 Laptop 8 GiB, NVIDIA 590.48.1, Wine 11.0, vkd3d-proton diagnostic build `2576c0b4adfae4a+` (relaxed-vtable; not stock certification), Rust 1.98.1 MSVC target, `dxgi.hideNvidiaGpu = False`, one test thread. Fresh intended-worktree compilation was confirmed (`Compiling victory-gpu .../VIctory-pr3522/crates/victory-gpu`, 9.31 s). Focused results: - `bindless::tests::slots_keep_what_each_index_sees`: **1/1 pass** — page boundary, far sparse page, replace/retain/remove. - `bindless::tests::hulls_follow_the_ranges`: **1/1 pass** — actual RTX/vkd3d device initialized; no skip line; same-range rewrite and start/end/inside hull transitions all completed. - `descriptor::host::tests::a_slot_made_again_on_its_resource_retires_nothing`: **1/1 pass** — actual RTX/vkd3d device initialized; same resource was not retired, replacement and null each retired once. Total focused result: **3 passed, 0 failed, 0 ignored**. No source edits, no title launch. I did not port the new retirement fixture to the parent, run the full library, or benchmark this host, so this confirms the changed ownership/range behavior on physical Wine/NVIDIA but not the claimed 25%/frame-time saving or a RAM-floor improvement. Evidence: `.compat-runtime/logs/verify-pr3522-changed-slot-fixtures.log`. AI-assisted verification; review-only, no code contribution.
Author
Owner

@⁠oddmaniv on GitHub · 2026-11-27 15:39 UTC · original

Independent verification of the PR author's concurrent WARP pipeline/draw test at babd487363e56203efae1b02850884c446271c2e.

cargo test --locked -p victory-shader --lib emit::host::tests::parallel_warp_pipelines_and_draws -- --exact --nocapture

Tree Result
Unmodified PR head 1 passed, 0 failed, 0 ignored; native exit 0
Unmodified main 1 passed, 0 failed, 0 ignored; native exit 0
PR patch applied to pinned main 1 passed, 0 failed, 0 ignored; native exit 0

Main baseline pin: 63bcca43c6a00a758510398fa43096ce7e4f7df0.

Windows x86_64 MSVC native runs. Local and remote source snapshots matched before and after each check. The adaptation applies the PR diff without additional source edits.
This is focused regression coverage, not the full workspace suite, a gameplay test, or an independent validation of every behavior in the PR. No new fix is claimed.

AI-assisted verification.

**@⁠oddmaniv** on GitHub · 2026-11-27 15:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/3522#issuecomment-7222322710) Independent verification of the PR author's concurrent WARP pipeline/draw test at `babd487363e56203efae1b02850884c446271c2e`. `cargo test --locked -p victory-shader --lib emit::host::tests::parallel_warp_pipelines_and_draws -- --exact --nocapture` | Tree | Result | | --- | --- | | Unmodified PR head | 1 passed, 0 failed, 0 ignored; native exit 0 | | Unmodified main | 1 passed, 0 failed, 0 ignored; native exit 0 | | PR patch applied to pinned main | 1 passed, 0 failed, 0 ignored; native exit 0 | Main baseline pin: `63bcca43c6a00a758510398fa43096ce7e4f7df0`. Windows x86_64 MSVC native runs. Local and remote source snapshots matched before and after each check. The adaptation applies the PR diff without additional source edits. This is focused regression coverage, not the full workspace suite, a gameplay test, or an independent validation of every behavior in the PR. No new fix is claimed. AI-assisted verification.
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-27 20:28 UTC · original

@⁠KainanP in-game result as promised. RTX 5090 (driver 620.73.04), Linux, GE-Proton11-14 Wine with its vkd3d-proton, GTA VI's prison yard, Series X profile at 2560×1440. Base: main plus the unmerged PRs this setup needs (listed in #3425), with our own heap-sync changes (stop at the host heap's count as in #3512; skip unchanged view lookups). This PR merged on top; adjacent 420 s runs, medians of the last 30 frame-rate lines:

frame min preparing heap sync (heap slots the title copied) title threads waiting to write views
control 203.0 ms 196.5 ms 77.0 ms 17.1 ms 79.7 ms
with #3522 202.8 ms 193.9 ms 76.1 ms 15.6 ms 75.7 ms

The heap sync is 1.5 ms cheaper, in the direction your benchmark predicts but smaller here, probably because our base already skips unchanged slots and stops at the host heap's count. The frame doesn't move outside run-to-run noise on this setup: preparing still runs serially with the GPU and copy-back, so a 1-2 ms saving is within the spread. No faults, pictures unchanged.

AI-assisted (Claude); measured on my machine, no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-27 20:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/3522#issuecomment-7227545995) @⁠KainanP in-game result as promised. RTX 5090 (driver 620.73.04), Linux, GE-Proton11-14 Wine with its vkd3d-proton, GTA VI's prison yard, Series X profile at 2560×1440. Base: `main` plus the unmerged PRs this setup needs (listed in #3425), with our own heap-sync changes (stop at the host heap's count as in #3512; skip unchanged view lookups). This PR merged on top; adjacent 420 s runs, medians of the last 30 frame-rate lines: | | frame | min | preparing | heap sync (`heap slots the title copied`) | title threads waiting to write views | |---|---|---|---|---|---| | control | 203.0 ms | 196.5 ms | 77.0 ms | 17.1 ms | 79.7 ms | | with #3522 | 202.8 ms | 193.9 ms | 76.1 ms | **15.6 ms** | 75.7 ms | The heap sync is 1.5 ms cheaper, in the direction your benchmark predicts but smaller here, probably because our base already skips unchanged slots and stops at the host heap's count. The frame doesn't move outside run-to-run noise on this setup: preparing still runs serially with the GPU and copy-back, so a 1-2 ms saving is within the spread. No faults, pictures unchanged. _AI-assisted (Claude); measured on my machine, no game data shared._
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3522/head:github-bot/gh-3522'
git switch 'github-bot/gh-3522'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3522'
git switch 'github-bot/gh-3522'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3522'
git switch 'github-bot/gh-3522'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3522'
git switch 'main'
git merge --squash 'github-bot/gh-3522'
git switch 'main'
git merge --ff-only 'github-bot/gh-3522'
git switch 'main'
git merge 'github-bot/gh-3522'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!3522
No description provided.