Skip to content

gpu: opt-in descriptor history with heap-relative filtering (carries #3321 and #3772) - #3891

Open
Leyukaka wants to merge 3 commits into
R0Y00:mainfrom
Leyukaka:takeover/3772
Open

Leyukaka wants to merge 3 commits into
R0Y00:mainfrom
Leyukaka:takeover/3772

Conversation

@Leyukaka

@Leyukaka Leyukaka commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Refs #3310. Supersedes #3321 and #3772, if their authors agree (see Landing order). Target main.

This branch carries the work of @wish131400 (#3321) and @Vilify-13 (#3772), rebased onto main bd72fae3d. The three original commits are kept with their authors, dates and messages unchanged; it adds no commit of ours.

Problem

#3321 adds an opt-in descriptor history and a GPU-written Mesh argument fixture. #3772 adds heap-relative filtering on top of it and carries #3321's commit. Both conflict with current main, and #3772's review has two open items: the landing order with #3321, which is still unanswered on #3321, and the rebase. Each rebase conflict sits in lines that #3321's commit touches, so the two cannot be rebased independently without one conflicting with the other.

Change

Commit Author Change
d468da90a @wish131400 Descriptor history and Mesh argument provenance fixture (#3321, 42a18553 + 029dfefe)
cd05d66b4 @Vilify-13 Targeted descriptor history filtering (#3772, 390f5c1d)
72ba1df20 @Vilify-13 Review follow-up: one cached off-path check, per-reason omission counters, full registry discovery (#3772, e2609c0e)
  • Off by default. With X2W_D3D12_DESCRIPTOR_HISTORY unset, note_view and note_copy call the same shadow_slot overloads as main; the filter variable is not read and no registry is built.
  • X2W_D3D12_DESCRIPTOR_HISTORY_FILTER takes up to two TYPE:VISIBILITY:NODE_MASK:CAPACITY:ORDINAL:FIRST:COUNT selectors and selects descriptor operations before they use the 8,192-record budget. Grammar and limits are in docs/experiments/descriptor-history-filter.md.
  • No GPU commands or synchronization are added.

The rebased diff equals the two PRs line by line, except for two mechanical conflict resolutions:

  • CMakePresets.json, pr test filter: keeps main's entries and adds this branch's (startup_mesh_argument_provenance_warp and startup_descriptor_history_(model|(filter|exhaustion|incomplete)_warp)).
  • tests/startup_indirect_draw_indexed.cpp, DrawKind::mesh condition: keeps the modes main added and adds mesh-provenance.

I found no logical conflict with #3725, #3776 or #3885.

Landing order

The three commits land together, in order: #3321's commit first, then #3772's two. This is the "close in favour of one PR" option from the #3772 review. It needs both authors' agreement, and I am asking on #3321 and #3772. If either author prefers to land their own PR, I will close this one.

Verification

Windows, on the same commits rebased onto bd72fae3d: 9 of 9 passed, GPU tests run serially. The branch was then rebased again onto 70d2679d7 without conflicts.

ctest --no-tests=error -j1 -V -R '^startup_(mesh_argument_provenance_(warp|hardware)|descriptor_history_(model|(filter|exhaustion|incomplete)_(warp|hardware)))$'
  • startup_mesh_argument_provenance_warp, startup_mesh_argument_provenance_hardware
  • startup_descriptor_history_model
  • startup_descriptor_history_filter_warp, startup_descriptor_history_filter_hardware
  • startup_descriptor_history_exhaustion_warp, startup_descriptor_history_exhaustion_hardware
  • startup_descriptor_history_incomplete_warp, startup_descriptor_history_incomplete_hardware

The mutation results reported in the #3772 review were not rerun on this head.

Known limitations

wish131400 and others added 3 commits December 2, 2026 22:02
Integrate the original contribution from PR R0Y00#3321, including the author's subsequent conflict resolution, onto main 158ef79.

Original authored commit: 42a1855
Original resolved PR head: 029dfef
Refs R0Y00#3310 and R0Y00#3321.
Select heap-relative descriptor ranges before consuming the diagnostic event budget. Match copies by source or destination, validate retained mapping and shadow identity, and bound diagnostic traversal after truncation.

Add source-built model and Mesh regression checks for filtering, exhaustion, and sparse copy windows. Document selection syntax, conservative attribution, and completeness limits.

Builds on wish131400's provenance work in R0Y00#3321 and the review findings of Leyukaka and Jess-Doit. Refs R0Y00#3310 and R0Y00#3321. AI-assisted implementation, testing and verification.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independently tested 674c1f48 with MSVC Debug on Windows 11 build 26300. ctest --preset dev --no-tests=error -j 1 --output-on-failure -R '^startup_(mesh_argument_provenance_(warp|hardware)|descriptor_history_(model|(filter|exhaustion|incomplete)_(warp|hardware)))$' passed all nine cases. That includes the disabled/invalid filter cases, history budget and omission controls, and Mesh argument readback on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. This is fixture coverage. The disabled-path timing comparison and the two original authors' landing choices are still open.

R0Y00 commented Dec 3, 2026

Copy link
Copy Markdown
Owner

I ran the source-built startup_descriptor_history_check model at 674c1f48 with MSVC C++17. The 1,024-heap discovery, 100,000 randomized registry operations, 20,000 randomized admission operations and all nine omission reasons passed. I also checked the merge against main at 29bb2aed: the remaining textual conflict is CMakePresets.json. Please keep main’s build targets and smoke tests, then add startup_descriptor_history_check, startup_mesh_argument_provenance_warp, and startup_descriptor_history_(model|(filter|exhaustion|incomplete)_warp). The model result does not cover the previously requested disabled-path benchmark, and the two original PRs’ landing order is still being coordinated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants