Page marks: shaders mark the pages they write, the compare hashes only those (opt-in; RTX 3080 18.3 → 20.0 fps) #3499

Closed
github-bot wants to merge 2 commits from github-bot/gh-3499 into main AGit
Owner

@⁠remijn on GitHub · 2026-11-30 00:03 UTC · original
remijn:page-marks → main · +1025 −26 · 24 files · 2 commits · closed without merging

Summary

Opt-in page marks. With VICTORY_MARK_WRITES=1, the translator adds to each buffer store or atomic whose view has a known title address a store that marks its 64 KiB page, in a table bound as u249 (SLOT_WRITTEN). A program counts as "marks all it writes" only if every one of its stores is marked. The compare then reads the marks:

  • VICTORY_WRITTEN_COMPARE=check: hashes everything as before, and counts pieces found changed whose page no shader marked (misses). This is the safety test.
  • VICTORY_WRITTEN_COMPARE=skip: leaves unhashed the pieces of pages that only marking programs declared written.

The compare gets 7 root constants (main's 6 plus the page of piece 0), a 16-byte counters buffer (u2) and the pages table (u3). While the marks are on, plans are compared in single passes, because the batched compare doesn't read the marks. Independent of the relay and of VICTORY_LAND_CAPTURE.

Also included:

  • A fix: a list's unmarked ranges are now emptied with the list and recorded once, and the compare looks up only those that overlap each range (UnmarkedIndex). Lists are reused, so before this each one kept the unmarked ranges of every frame it had recorded: preparing took 311 ms a frame instead of 41, and stale ranges kept most pages out of the marks.
  • VICTORY_DECLARED_BY (diagnostics): which shaders' declared writes the compare hashes, and how much of it changed.

Defaults: unchanged. Everything is off unless set.

Measured

RTX 3080, Series S profile, no DLSS or frame generation, play-foxhound.ps1's settings, diagnostics build, the same save, 40 s after a 20 s warm-up, one run each:

fps preparing GPU 1 % low p99 frame
defaults 18.3 40.2 ms 3.3 ms 8.8 113 ms
marks, skip 20.0 38.8 ms 2.3 ms 9.4 106 ms
  • check: 0.00 misses a frame throughout, with about 7,200 of 8,060 pieces a frame in marked-only pages.
  • skip: about 7,000 pieces a frame left unhashed, still 0.00 misses.

These runs used a build that also contained VICTORY_LAND_CAPTURE (off). In this PR the marks have their own counters buffer instead of sharing capture's slots, so their results should be the same, but the split build hasn't been re-measured.

Why opt-in

  • Skip mode trusts the marks. A write to a page no shader marked would be missed without any warning. 0 misses so far covers one card and one scene.
  • The switch is in the shader cache key. Turning it on retranslates every shader, so run -Preload once first: without it, the title builds thousands of pipelines while it plays, which ran a 32 GB PC out of memory.

Tested

cargo check with and without diagnostics. 46 compare and marks tests pass, including the marking translator test (its DXIL validates), warp_card_compare_follows_the_pages_shaders_mark and unmarked_index_finds_the_overlapping_ranges_of_the_copy. The hardware compare tests pass on the RTX 3080.

Please test: preload once, then play a while with VICTORY_MARK_WRITES=1 VICTORY_WRITTEN_COMPARE=check and report the log line the compare and the pages shaders mark ... (misses).

Replaces part of #3446.

🤖 Generated with Claude Code

**@⁠remijn** on GitHub · 2026-11-30 00:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3499) `remijn:page-marks` → `main` · +1025 −26 · 24 files · 2 commits · closed without merging ## Summary Opt-in page marks. With `VICTORY_MARK_WRITES=1`, the translator adds to each buffer store or atomic whose view has a known title address a store that marks its 64 KiB page, in a table bound as `u249` (`SLOT_WRITTEN`). A program counts as "marks all it writes" only if every one of its stores is marked. The compare then reads the marks: - `VICTORY_WRITTEN_COMPARE=check`: hashes everything as before, and counts pieces found changed whose page no shader marked (misses). This is the safety test. - `VICTORY_WRITTEN_COMPARE=skip`: leaves unhashed the pieces of pages that only marking programs declared written. The compare gets 7 root constants (`main`'s 6 plus the page of piece 0), a 16-byte counters buffer (`u2`) and the pages table (`u3`). While the marks are on, plans are compared in single passes, because the batched compare doesn't read the marks. Independent of the relay and of `VICTORY_LAND_CAPTURE`. Also included: - **A fix:** a list's unmarked ranges are now emptied with the list and recorded once, and the compare looks up only those that overlap each range (`UnmarkedIndex`). Lists are reused, so before this each one kept the unmarked ranges of every frame it had recorded: preparing took 311 ms a frame instead of 41, and stale ranges kept most pages out of the marks. - **`VICTORY_DECLARED_BY`** (diagnostics): which shaders' declared writes the compare hashes, and how much of it changed. **Defaults:** unchanged. Everything is off unless set. ## Measured RTX 3080, Series S profile, no DLSS or frame generation, `play-foxhound.ps1`'s settings, diagnostics build, the same save, 40 s after a 20 s warm-up, one run each: | | fps | preparing | GPU | 1 % low | p99 frame | |---|---|---|---|---|---| | defaults | 18.3 | 40.2 ms | 3.3 ms | 8.8 | 113 ms | | marks, `skip` | **20.0** | 38.8 ms | 2.3 ms | 9.4 | 106 ms | - `check`: 0.00 misses a frame throughout, with about 7,200 of 8,060 pieces a frame in marked-only pages. - `skip`: about 7,000 pieces a frame left unhashed, still 0.00 misses. These runs used a build that also contained `VICTORY_LAND_CAPTURE` (off). In this PR the marks have their own counters buffer instead of sharing capture's slots, so their results should be the same, but the split build hasn't been re-measured. ## Why opt-in - **Skip mode trusts the marks.** A write to a page no shader marked would be missed without any warning. 0 misses so far covers one card and one scene. - **The switch is in the shader cache key.** Turning it on retranslates every shader, so run `-Preload` once first: without it, the title builds thousands of pipelines while it plays, which ran a 32 GB PC out of memory. ## Tested `cargo check` with and without `diagnostics`. 46 compare and marks tests pass, including the marking translator test (its DXIL validates), `warp_card_compare_follows_the_pages_shaders_mark` and `unmarked_index_finds_the_overlapping_ranges_of_the_copy`. The hardware compare tests pass on the RTX 3080. **Please test:** preload once, then play a while with `VICTORY_MARK_WRITES=1 VICTORY_WRITTEN_COMPARE=check` and report the log line `the compare and the pages shaders mark ... (misses)`. Replaces part of #3446. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With VICTORY_MARK_WRITES=1 the translator adds, to each buffer store or
atomic whose view has a known title address, a store marking its 64 KiB page
in a table bound as u249 (SLOT_WRITTEN). VICTORY_WRITTEN_COMPARE=check hashes
as before and counts changed pieces in unmarked pages (misses); skip leaves
pieces of pages only marking shaders declared unhashed. The compare gets
seven root constants (the page of piece 0 added), a counters buffer (u2) and
the pages table (u3); the batched compare is used while the marks are off.

A list's unmarked ranges are emptied with it and recorded once, and the
compare looks up only those overlapping each range (UnmarkedIndex): lists
are reused, and kept every frame's otherwise (311 ms a frame preparing).

Also VICTORY_DECLARED_BY (diagnostics): which shaders' declared writes the
compare hashes, and how much of it changed.

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

@⁠DoubleD17 on GitHub · 2026-11-30 04:52 UTC · original · edited 2026-11-30 09:56 UTC

We ran a test of this PR on current main (41adb551 with this PR merged) with VICTORY_MARK_WRITES=1 VICTORY_WRITTEN_COMPARE=skip, after a preload with VICTORY_MARK_WRITES=1. The runs compiled nothing extra: about 30 shaders each, the same as main.

The marks work here too. Each frame has about 9,440 pieces in spans that only marking shaders declared and about 790 hashed whole, and about 9,300 are left unhashed. Misses were 0.00 in all 366 lines of both runs.

But on this machine it is slower:

CPU prep (ms/frame) main at that point fps (mean) main at that point
round 1 75.6 63.9 11.63 12.86
round 2 73.8 63.1 11.90 13.22
mean difference +11.2 ms −9.8 %

Both rounds agree, and the gap is much bigger than the spread of main's own runs in that session (1.6 ms).

Where it goes, from the 5 s lines (medians over each run):

  • the submitting thread worked 78.6 and 75.5 ms a frame, against 68.0 and 65.7 on main;
  • the title's threads waited 9.3 and 9.5 ms a frame at presents, against 3.6 and 4.2;
  • the card was less busy: 85 %, against 87 to 96 %.

This machine is limited by the submitting thread (about 64 ms of CPU preparation, against 40 in your runs), not by the card. So the card time the marks save does not show here, and the extra work on the submitting thread does. Our guess is the single-pass compare while the marks are on, but we have not profiled it.

Memory: about 1 GB more private memory (33.2 and 32.8 GB, against 31.9 and 32.1).

Picture: 0 defects in 160 frames with the marks on.

We ran skip, not the check you asked for. We will add a check run and post its line here.

Setup:

  • Ryzen 7 5800X (8 cores, 16 threads), RTX 5070 12 GB (DXGI budget 11,175 MB), 64 GB RAM, Windows 11;
  • Series X, 1440p with DLAA (DLSS at native resolution; corrected, this line said DLSS Performance at first), frame generation and ray tracing off;
  • 41adb551 with this PR and the two switches, against 41adb551 alone;
  • 150 s runs in alternating order (main, PR, main, PR);
  • every run starts from the same save, restored before each run;
  • prep is the median of the 5 s host lines, fps the mean; each run is compared with main's runs interpolated in time.

AI Assisted

**@⁠DoubleD17** on GitHub · 2026-11-30 04:52 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3499#issuecomment-7269154296) · edited 2026-11-30 09:56 UTC We ran a test of this PR on current main (41adb551 with this PR merged) with `VICTORY_MARK_WRITES=1 VICTORY_WRITTEN_COMPARE=skip`, after a preload with `VICTORY_MARK_WRITES=1`. The runs compiled nothing extra: about 30 shaders each, the same as main. The marks work here too. Each frame has about 9,440 pieces in spans that only marking shaders declared and about 790 hashed whole, and about 9,300 are left unhashed. Misses were 0.00 in all 366 lines of both runs. But on this machine it is slower: | | CPU prep (ms/frame) | main at that point | fps (mean) | main at that point | |---|---|---|---|---| | round 1 | 75.6 | 63.9 | 11.63 | 12.86 | | round 2 | 73.8 | 63.1 | 11.90 | 13.22 | | **mean difference** | **+11.2 ms** | | **−9.8 %** | | Both rounds agree, and the gap is much bigger than the spread of main's own runs in that session (1.6 ms). Where it goes, from the 5 s lines (medians over each run): - the submitting thread worked 78.6 and 75.5 ms a frame, against 68.0 and 65.7 on main; - the title's threads waited 9.3 and 9.5 ms a frame at presents, against 3.6 and 4.2; - the card was less busy: 85 %, against 87 to 96 %. This machine is limited by the submitting thread (about 64 ms of CPU preparation, against 40 in your runs), not by the card. So the card time the marks save does not show here, and the extra work on the submitting thread does. Our guess is the single-pass compare while the marks are on, but we have not profiled it. **Memory:** about 1 GB more private memory (33.2 and 32.8 GB, against 31.9 and 32.1). **Picture:** 0 defects in 160 frames with the marks on. We ran `skip`, not the `check` you asked for. We will add a `check` run and post its line here. **Setup:** - Ryzen 7 5800X (8 cores, 16 threads), RTX 5070 12 GB (DXGI budget 11,175 MB), 64 GB RAM, Windows 11; - Series X, 1440p with DLAA (DLSS at native resolution; corrected, this line said DLSS Performance at first), frame generation and ray tracing off; - 41adb551 with this PR and the two switches, against 41adb551 alone; - 150 s runs in alternating order (main, PR, main, PR); - every run starts from the same save, restored before each run; - prep is the median of the 5 s host lines, fps the mean; each run is compared with main's runs interpolated in time. AI Assisted
Author
Owner

@⁠remijn on GitHub · 2026-11-30 05:08 UTC · original

Thanks for the careful test: alternating runs, the same save, and the check that nothing extra compiled make this easy to trust. Your result is right, and it points at a flaw in how I measured this PR.

Why our numbers differed. Every marks run I did also had VICTORY_LAND_CAPTURE=1 on. Capture already forces the compare into single passes, so my baseline had already lost the batched compare, and the marks only showed their saving (less hashing). On plain main, as in your test, the baseline uses the batched compare. Turning the marks on switches every plan to single passes, cut into runs of marked and unmarked pieces, with the planning that goes with that. That's the cost you measured.

I've since measured that planning directly on an RTX 3080 / Ryzen 9 7900X3D (Series S, the VICTORY_SEND_RUNS diagnostics from #3726): card_record takes 2.6 ms a frame on main and 5.3 ms with the marks on. On a machine bound by the submitting thread, like your 5800X at ~64 ms of preparation, that overhead weighs more and the GPU time the marks save doesn't show at all, so a net loss is what one would expect. Your +11 ms is larger than my +2.7 ms. I suspect it scales with the number of compared ranges per frame, which depends on the scene and settings (you ran Series X at 1440p), but I haven't verified that.

I can't explain the +1 GB of private memory yet. The marks' page table is only 8 MB, so it's something else: plausibly the per-plan unmarked ranges, or a difference in what's cached. I'll measure it.

So this PR shouldn't be merged as it stands. The marks only pay off if their planning costs less than the hashing they save, and on main it currently doesn't. What I'll try:

  • skip the per-piece marked/unmarked split for ranges no unmarked declaration overlaps (in your numbers about 9,300 of 9,440 pieces are in such spans), so most ranges plan as cheaply as without the marks;
  • keep those ranges on the batched compare instead of forcing single passes; a job-table variant of the single pass, which already matches it exactly in every mode on WARP and a 3080, would cover the rest.

Then I'll measure again on plain main with the marks alone, which is the comparison this PR should have had. Running check would still help: misses at 0.00 over long play is the other half of what the marks need before they could become a default.

**@⁠remijn** on GitHub · 2026-11-30 05:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3499#issuecomment-7269394482) Thanks for the careful test: alternating runs, the same save, and the check that nothing extra compiled make this easy to trust. Your result is right, and it points at a flaw in how I measured this PR. **Why our numbers differed.** Every marks run I did also had `VICTORY_LAND_CAPTURE=1` on. Capture already forces the compare into single passes, so my baseline had already lost the batched compare, and the marks only showed their saving (less hashing). On plain `main`, as in your test, the baseline uses the batched compare. Turning the marks on switches every plan to single passes, cut into runs of marked and unmarked pieces, with the planning that goes with that. That's the cost you measured. I've since measured that planning directly on an RTX 3080 / Ryzen 9 7900X3D (Series S, the `VICTORY_SEND_RUNS` diagnostics from #3726): `card_record` takes **2.6 ms a frame on `main`** and **5.3 ms with the marks on**. On a machine bound by the submitting thread, like your 5800X at ~64 ms of preparation, that overhead weighs more and the GPU time the marks save doesn't show at all, so a net loss is what one would expect. Your +11 ms is larger than my +2.7 ms. I suspect it scales with the number of compared ranges per frame, which depends on the scene and settings (you ran Series X at 1440p), but I haven't verified that. I can't explain the **+1 GB of private memory** yet. The marks' page table is only 8 MB, so it's something else: plausibly the per-plan unmarked ranges, or a difference in what's cached. I'll measure it. **So this PR shouldn't be merged as it stands.** The marks only pay off if their planning costs less than the hashing they save, and on `main` it currently doesn't. What I'll try: - skip the per-piece marked/unmarked split for ranges no unmarked declaration overlaps (in your numbers about 9,300 of 9,440 pieces are in such spans), so most ranges plan as cheaply as without the marks; - keep those ranges on the batched compare instead of forcing single passes; a job-table variant of the single pass, which already matches it exactly in every mode on WARP and a 3080, would cover the rest. Then I'll measure again on plain `main` with the marks alone, which is the comparison this PR should have had. Running `check` would still help: misses at 0.00 over long play is the other half of what the marks need before they could become a default.
Author
Owner

@⁠DoubleD17 on GitHub · 2026-11-30 07:13 UTC · original

Follow-up with VICTORY_WRITTEN_COMPARE=check, as you asked: two more 150 s runs (VICTORY_MARK_WRITES=1, same preload) between two main runs.

Misses: 0.00 in all 370 lines of both runs. The last line of each:

the compare and the pages shaders mark (VICTORY_WRITTEN_COMPARE=check) per frame: 9443 pieces in spans every declaration of came from a shader that marks, 788 in others (hashed whole); 0.0 pieces left unhashed, unmarked; 0.00 pieces found changed whose page no shader marked (misses)
the compare and the pages shaders mark (VICTORY_WRITTEN_COMPARE=check) per frame: 10216 pieces in spans every declaration of came from a shader that marks, 793 in others (hashed whole); 0.0 pieces left unhashed, unmarked; 0.00 pieces found changed whose page no shader marked (misses)

Counting skip and check together, that makes 0 misses in about 740 five-second lines on a second card (RTX 5070) and a second profile (Series X).

The cost in check mode is the same as in skip mode: +12.9 ms of CPU preparation per frame and −7.0 % fps against main at that point. On the seconds where the idle camera shows the lighter views (about 7,500 draws a frame), it is +11.5 ms, against +11.6 ms for skip. So on this machine the extra time comes with the marks themselves (the marking shaders, or the single-pass compare while they are on), not with what skip leaves unhashed.

Picture: 0 defects in 160 frames.

AI Assisted

**@⁠DoubleD17** on GitHub · 2026-11-30 07:13 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3499#issuecomment-7271489944) Follow-up with `VICTORY_WRITTEN_COMPARE=check`, as you asked: two more 150 s runs (`VICTORY_MARK_WRITES=1`, same preload) between two main runs. **Misses: 0.00 in all 370 lines of both runs.** The last line of each: ``` the compare and the pages shaders mark (VICTORY_WRITTEN_COMPARE=check) per frame: 9443 pieces in spans every declaration of came from a shader that marks, 788 in others (hashed whole); 0.0 pieces left unhashed, unmarked; 0.00 pieces found changed whose page no shader marked (misses) the compare and the pages shaders mark (VICTORY_WRITTEN_COMPARE=check) per frame: 10216 pieces in spans every declaration of came from a shader that marks, 793 in others (hashed whole); 0.0 pieces left unhashed, unmarked; 0.00 pieces found changed whose page no shader marked (misses) ``` Counting skip and check together, that makes 0 misses in about 740 five-second lines on a second card (RTX 5070) and a second profile (Series X). The cost in check mode is the same as in skip mode: +12.9 ms of CPU preparation per frame and −7.0 % fps against main at that point. On the seconds where the idle camera shows the lighter views (about 7,500 draws a frame), it is +11.5 ms, against +11.6 ms for skip. So on this machine the extra time comes with the marks themselves (the marking shaders, or the single-pass compare while they are on), not with what skip leaves unhashed. Picture: 0 defects in 160 frames. AI Assisted
Author
Owner

@⁠remijn on GitHub · 2026-11-30 12:32 UTC · original

Follow-up: where the marks' cost comes from, and when they help

I measured this on an RTX 3080 / Ryzen 9 7900X3D (12 cores), Series S, DLSS Quality, FSR 3 frame generation, with capture off (as on main) and only VICTORY_MARK_WRITES toggled. Same save every run, diagnostics build. Three A/B pairs of 30 s each, run order alternated:

fps (median) preparing card_record p99 frame
marks off 19.9 / 20.9 / 21.3 → 20.7 35.6 ms ~2.6 ms 89 ms
marks on 18.7 / 18.4 / 20.4 → 19.2 39.3 ms ~4.1 ms 105 ms

So the marks are about 7 % slower here too: the same direction as DoubleD17's −9.8 %, smaller on a faster CPU.

That includes two fixes to the marks' planning (on my branch, not pushed yet): UnmarkedIndex is now one flat sorted vector instead of a hash map of per-copy vectors, and ranges with no unmarked overlap are planned as one run. They took the marks' extra card_record time from +2.5 ms to +1.5 ms a frame, but didn't close the gap.

Where the rest goes: I profiled the submitting thread with marks off and on, using a build without identical-code folding (-C link-arg=/OPT:NOICF) so function names are reliable, and diffed it:

  • Direct cost: card_record goes from 6.3 % to 9.0 % of that thread (planning, the unmarked index, the clearing pass), about +1.5 ms a frame.
  • Indirect cost: the refreshes (Shadow::update, watch::writes, watch::guards) also take a larger share. The run counters show they do the same work in both cases: ~41 flushes of ~11,000 ranges a frame, ~540–555 blocks re-protected, ~235 write-watch queries over ~1.17 GB. They're just ~0.5–1 ms slower, and the guard waits summed over threads rise from ~30 to ~34 ms. That's CPU contention: the marks' extra work lands on a CPU whose cores are already all busy, and no separate mechanism shows up.
  • Saving: ~7,000 pieces a frame left unhashed, with 0.00 misses throughout. But that saving is GPU time, and in these runs the GPU is busy only ~20 ms of a ~48 ms frame.

So the marks only pay off when the GPU is the limit (higher resolution, ray tracing on, a slower card, or a much faster CPU). Where the submitting thread or the CPU as a whole is the limit, which is the case on both machines tested so far, they cost more than they save. I'm leaving this PR open for that case, with the marks opt-in as they are. It shouldn't become a default without measurements from a GPU-bound setup.

**@⁠remijn** on GitHub · 2026-11-30 12:32 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3499#issuecomment-7278589449) **Follow-up: where the marks' cost comes from, and when they help** I measured this on an RTX 3080 / Ryzen 9 7900X3D (12 cores), Series S, DLSS Quality, FSR 3 frame generation, with **capture off** (as on `main`) and only `VICTORY_MARK_WRITES` toggled. Same save every run, diagnostics build. Three A/B pairs of 30 s each, run order alternated: | | fps (median) | preparing | `card_record` | p99 frame | |---|---|---|---|---| | marks off | 19.9 / 20.9 / 21.3 → **20.7** | **35.6 ms** | ~2.6 ms | **89 ms** | | marks on | 18.7 / 18.4 / 20.4 → **19.2** | **39.3 ms** | ~4.1 ms | **105 ms** | So the marks are **about 7 % slower** here too: the same direction as DoubleD17's −9.8 %, smaller on a faster CPU. That includes two fixes to the marks' planning (on my branch, not pushed yet): `UnmarkedIndex` is now one flat sorted vector instead of a hash map of per-copy vectors, and ranges with no unmarked overlap are planned as one run. They took the marks' extra `card_record` time from +2.5 ms to +1.5 ms a frame, but didn't close the gap. **Where the rest goes:** I profiled the submitting thread with marks off and on, using a build without identical-code folding (`-C link-arg=/OPT:NOICF`) so function names are reliable, and diffed it: - **Direct cost:** `card_record` goes from 6.3 % to 9.0 % of that thread (planning, the unmarked index, the clearing pass), about **+1.5 ms a frame**. - **Indirect cost:** the refreshes (`Shadow::update`, `watch::writes`, `watch::guards`) also take a larger share. The run counters show they do **the same work** in both cases: ~41 flushes of ~11,000 ranges a frame, ~540–555 blocks re-protected, ~235 write-watch queries over ~1.17 GB. They're just ~0.5–1 ms slower, and the guard waits summed over threads rise from ~30 to ~34 ms. That's CPU contention: the marks' extra work lands on a CPU whose cores are already all busy, and no separate mechanism shows up. - **Saving:** ~7,000 pieces a frame left unhashed, with 0.00 misses throughout. But that saving is **GPU time**, and in these runs the GPU is busy only ~20 ms of a ~48 ms frame. **So the marks only pay off when the GPU is the limit** (higher resolution, ray tracing on, a slower card, or a much faster CPU). Where the submitting thread or the CPU as a whole is the limit, which is the case on both machines tested so far, they cost more than they save. I'm leaving this PR open for that case, with the marks opt-in as they are. It shouldn't become a default without measurements from a GPU-bound setup.
- UnmarkedIndex is one vector sorted in place by host copy and start, with
  the furthest end per range within its copy, instead of a hash map of a
  vector per copy (made, grown and dropped for every plan). It takes the
  plan's unmarked ranges by value instead of copying them again.
- A compared range no unmarked declaration overlaps (most of them) is one run
  in one mode, without the per-piece vector and the run cutting. The per-range
  vector is reused for the others.
- card_record sizes its range lists once instead of growing them per push.
- The counters test checks WRITTEN_COUNTERS_BYTES at compile time (clippy:
  an assertion with a constant value).

RTX 3080, Series S, capture off, marks on: card_record's extra time over
marks off went from about +2.5 to +1.5 ms a frame. The marks still cost more
on the submitting thread than they save on the GPU there (see the PR).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot closed this pull request 2026-12-01 18:58:31 +00:00

Pull request closed

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/trustno1-coder--VIctory-NVIDIA!3499
No description provided.