Repository navigation
Conversation
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.
Leyukaka
left a comment
There was a problem hiding this comment.
Reviewed 390f5c1d by reading the diff; not built or run.
Verdict: approve. No MUST. Two SHOULDs and two NITs below.
Integration. 04a6c5a0 combines 42a18553 and wish131400's merge 029dfefe into one commit, with the original author, author date and headline kept. Four of its files match 029dfefe byte for byte. In the other four, the added and removed lines match 029dfefe except where main changed the same lines: CMakePresets.json adds only startup_mesh_argument_provenance_warp to the new pr filter, and tests/startup_indirect_draw_indexed.cpp keeps runtime_mesh57. GitHub reports the branch mergeable into 158ef794.
Earlier review points on #3321
- Leyukaka 1 (conflict): addressed, see above.
- Leyukaka 2 (the 8,192 cap is used up during initialization): addressed. Operations are selected by heap and slot range before they use the budget (
d3d12_capture.inl:700-744,retained_registry.h:165-181). The exhaustion cases check the 4093/4094 boundary and a later heap kept after 5,000 unrelated slots. - Leyukaka 3 (info queue): addressed in
029dfefe. The fixture printsinfo_queue=present|absentand the check reads it (startup_mesh_argument_provenance_check.py:96). - Jess-Doit 3 (the walk continues after the cap): addressed. Once truncated,
history_reservereturns at once (d3d12_capture.inl:705), legacy mode skipstitle_descriptor_stride(:943), and planning stops (xs_device.cpp:6265, 6501, 6541, 7717). - Jess-Doit 1 (guest token and whether the guest copy ran): not addressed.
copyevents still record shadow ids only (d3d12_capture.inl:962). - Jess-Doit 2 (byte range of typed buffer SRVs): not addressed (
:809-816). - lukaslw-lab
source_id=: partly addressed. In filtered mode, an untracked or opaque endpoint makes the record be refused and reported as incomplete (history_admission.h:58-63). Legacy mode still logs an untracked source asnew=0(:962). - JohnConnorNPC's id-reuse note: addressed in
docs/startup-runtime.mdandmesh-argument-provenance.md.
SHOULD
- Off path (
d3d12_capture.inl). WithX2W_D3D12_DESCRIPTOR_HISTORYunset,note_copynow callshistory_legacy_enabled(), then, under exclusivenote_lock, twohistory_shadow_observe()calls and ahistory_reserve()call (:943, 954-957);note_viewdoes the same (:899-902). #3321 had one cached flag check. Each call returns early and allocates nothing, but a single cached "history active" check at the call sites would restore the old cost of the hot copy path. - Omissions are reported once (
history_runtime.inl:15-22).history_incompletelogs only the first reason per process, so later refused selected operations leave no trace, and a reader cannot tell one omission from thousands. A per-reason counter, or the first N lines, would make the history usable on a real run. Related: discovery logs only the first 256 registrations (heap_shape.h:14), so the ordinal needed to select a heap created later cannot be found from the log.
NIT
- The PR body says "This draft integrates…", but the PR is not a draft.
- The model check covers the refusal paths. No GPU case runs an incomplete path, such as a selected copy from an untracked source.
Checks
- Off by default: an unset master switch skips the filter variable, and the registry is built only once filtering is active.
- Memory is bounded: 1,024 registrations, 2 selectors, 8,192 events.
- Locks:
descriptor_lockis taken before or outsidenote_lock(history_runtime.inl:156-161, 172-179). Undernote_lock, admission makes only shadow lookups and atomic reads. - No GPU commands are added. The truncation marker is written after the records admitted with it.
- Tests use
require()(exit 1) and Pythonassert.startup_descriptor_history_{model,filter_*,exhaustion_*}are registered, and CI at this head ran model, filter_warp and exhaustion_warp:Passed. - The body cites #3310 as Refs only and says the remaining criteria are still open.
|
Thank you for reviewing! I'm taking a look at both SHOULDs, would you rather I address these in this PR before merge or submit the changes in a follow up PR? |
Not-Saii
left a comment
There was a problem hiding this comment.
Review of head 390f5c1d1e1f460422fcf8ff3d78da8a8aa27877 (base 158ef79422f296c48873bfe8123e1e040125dc0a).
The filtering code is careful, and it was tested well in an isolated build. Both reverted-behavior mutants were caught by the PR's own tests, and the restored tree passed again. One scope issue blocks approval. It concerns how the PR is put together, not the filter.
Findings
MUST
-
Two behaviors from two authors, one of them still an open PR. Commit
04a6c5a0is the change from #3321, rebased onto currentmain. I compared it with #3321's own diff, and only the context lines differ. #3321 is still open. That commit adds the opt-in descriptor history (d3d12_capture.inltrace_descriptor_history,note_view/note_copyhooks) and the Mesh argument provenance fixture (tests/startup_mesh_argument_provenance.inl,tests/startup_mesh_argument_provenance_check.py,tests/cmake/mesh_argument_provenance.cmake,docs/experiments/mesh-argument-provenance.md). Commit390f5c1dadds the heap-relative filter. AGENTS.md and CONTRIBUTING.md:82 ask for one reviewable behavior per pull request, and CONTRIBUTING.md asks the description to "name any PR that must land first" rather than carry it. Commit04a6c5a0also brings along review points that are still open on #3321, among them that the trace does not record whether the guest copy ran, and that typed buffer SRVs log no byte range. Those belong in that thread. As it stands, merging either PR leaves the other conflicting or duplicated, and reviewers have to review #3321's code twice. Please do one of these:- land #3321 first and rebase this PR so it carries only
390f5c1d; - or get agreement in #3321 that it closes in favour of this PR, and record that here.
The PR body defers landing order to maintainer coordination. This finding asks for that coordination to happen before merge.
- land #3321 first and rebase this PR so it carries only
SHOULD
- The PR body evidence does not match the head or the commands.
- The body reports "Debug focused regression 59 / Release 59". Its reproduction regex selects 7 tests. Please list the 59 tests, or report the 7 tests that the command runs.
- The mutation table was measured against base
959306d4, not this head. Please rerun it at390f5c1d, or label it as historical. (For what it is worth, my two mutants below were caught at this head.) - "Debug layer: Enabled for relevant GPU fixtures" should name the fixtures. Report the
provenance debug info_queue=result, which the fixture prints. - List the
_hardwareand_warpresults per test, with any 77 skips kept separate. At the moment they are only totals.
NIT
src/startup_stubs/descriptor_history/history_runtime.inl:19:history_incompletelogs only the first reason in each process. The doc (docs/experiments/descriptor-history-filter.md:61-63) lists several reasons that can omit operations. A later omission with a different cause is silent. A per-reason first-call flag, or a count at the first truncation, would make the trace easier to audit.docs/experiments.md:5-7adds a new section at the top of the file that keeps the older notes. The folder guide sends new notes todocs/experiments/<topic>.md, "so two pull requests that each add a note do not edit the same lines". This PR already addsdocs/experiments/descriptor-history-filter.md, and the README row links it, so the extra section in the old file only adds a conflict point.
What I checked and found sound
-
Opt-in and cost when off. With
X2W_D3D12_DESCRIPTOR_HISTORYunset, the filter variable is never read (descriptor_history_config_win.h), andhistory_configuration()is a cached function-local static. The off path adds these checks:- each view creation and each copy chunk reads a cached flag and zero-initialises the history structs on the stack (
d3d12_xs_device.cpp:6265,6501,6541,7717); note_view(d3d12_capture.inl:900) andnote_copyeach callhistory_reserveonce, and it returns at theplan.status == offcheck before touchingGetLastError;note_copyalso callshistory_legacy_enabled().
None of these takes a lock, reads the environment or makes a syscall. The draw path reaches the change only through
shadow_slot's two new defaulted parameters (shadow_idatd3d12_capture.inl:296,389), so a draw-time lookup gains one null check.The native copy, the shadow publication and the token writes run in the same order as before.
device_create_descriptor_heapstill pushes the samedescriptor_rangesentry. The filter'soffcase and the provenance trace opt-out both assert that no history line appears. - each view creation and each copy chunk reads a cached flag and zero-initialises the history structs on the stack (
-
Locks. The budget (
d3d12_capture.inl:715) is used only undernote_lockexclusive, innote_view,note_copyanddrop_unrecorded_view. The registry andhistory_ownersare used only underdescriptor_lock. Thehistory_plan_*functions takedescriptor_lockshared beforenote_lockis taken, and the row lookups in admission useshadow_slotwith no second lock, so no new nesting appears. A concurrent heap registration bumpshistory_publication, and admission checks it before and after the row probes, so a race drops the record and reports it as incomplete. WithX2W_D3D12_TABLE_LOCK=1, heap table writers still takenote_lockexclusive beforetable_lock(d3d12_capture.inl:181,194), so theshadow_slotreads made while holdingnote_lockstay consistent. No PR test runs with that switch. -
Call sites. All 4
note_viewcallers and the onenote_copycaller pass an expectation.descriptor_rangesis append-only: there is onepush_backand no erase, which matches the registry'smapping_index == mapped_count_+1rule. -
Memory bounds.
- The registry is a lazily built static of 1,024 registrations, 73,856 bytes as the model check prints it. It exists only in filtered mode.
history_ownersis 8 KB of static storage.- The budget is O(1).
- Admission probes only the admitted rows; the model asserts this up to a 1,000,000-descriptor copy.
- Discovery logging stops after 256 registrations.
- Past 1,024 registrations, the registry faults closed (
retained_registry.h:104), asdescriptor-history-filter.md:50documents.
In filtered mode,
attribute()scans the retained registrations linearly for each view and each copy chunk (retained_registry.h:128). That cost matches the existingdescriptor_rangeswalk, and it is diagnostic-only. -
Platform split.
descriptor_history_config_win.his the only new header that includes<windows.h>. The model check compiles the portable headers together withdescriptor_heap_match.h. -
Content. The diff names no title and contains no third-party assets.
-
CMakePresets.json. The change touches only theprpresets. It addsstartup_descriptor_history_checkto theprbuild targets and addsstartup_mesh_argument_provenance_warp|startup_descriptor_history_(model|(filter|exhaustion)_warp)to theprtest filter. Thedev,releaseandruntimepresets are unchanged. Nothing in the PR adds a download, a network call or a new build tool.
What each test proves
startup_descriptor_history_modeltests the shared headers without D3D12:- selector grammar and its rejections;
- registry attribution of mirrors, tails, ambiguous and stale endpoints;
- the union of source and destination windows;
- transactional admission (rollback on a bad row, only admitted rows probed, the marker only after a valid omitted record, no work after the stop);
- 20,000 randomized admission cases and 100,000 randomized registry cases.
startup_descriptor_history_filter_{warp,hardware}runs 19 cases. The five provenance cases each run withboth,sourceanddestinationselectors, andpositivealso runs with an empty, off, invalid and unmatched filter. Each case checks:- the exact history sequence and the registry lines with their selector masks;
- a positive result of 8/8 pixels, and negative controls that fail the oracle;
- no debug-layer errors.
startup_descriptor_history_exhaustion_{warp,hardware}runs 9 cases with 4,093 to 5,000 unrelated slots. It covers:- the legacy budget boundary: 8,191 records with no marker, then 8,192 with the marker;
- the exact boundary, 4,096 selected noise slots giving exactly 8,192 records and no marker;
target, which keeps the 5 Mesh records after 10,000 unrelated events;mixedandsparsecopy windows.
startup_mesh_argument_provenance_{warp,hardware}runs the #3321 oracle: the positive case, four negative controls, and the positive case with tracing off.
Mutation results (Windows Sandbox, network off, PR tree read-only)
- M1: the copy plan drops the source window. In
retained_registry.h:179, I changedfilter::merge(result, window(a), window(b))tomerge(result, {}, window(b)).- Rebuild check:
d3d12_xs.dllandstartup_descriptor_history_check.exeboth changed. - 5 tests failed, at the expected points:
startup_descriptor_history_modelfailed at "source or mirror-backed destination union";filter_warpandfilter_hardwarefailed at the firstsourcecase, afterpositive bothpassed;exhaustion_warpandexhaustion_hardwarefailed at the firstnoisecase, after thelegacy,targetandoffcases passed.
- The 6 other tests in the set still passed.
- The restored tree passed 11/11.
- Rebuild check:
- M2: filtered mode uses the unfiltered plan before the budget. In
d3d12_capture.inl:707, I changed the condition toif (history_legacy_enabled() || history_filtered()). This reverts "select before budget consumption".- Rebuild check:
d3d12_xs.dllchanged. startup_descriptor_history_modelstill passed. That is expected, because this is a runtime-only revert.- 4 tests failed:
filter_warpandfilter_hardwarefailed at the first case (positive both) on the history-sequence assertion;exhaustion_warpandexhaustion_hardwarefailed atslots=5000 mode=targetafter the threelegacycases passed, so unrelated events consumed the budget before the selected Mesh records.
- The restored tree passed 5/5.
- Rebuild check:
Evidence (AGENTS.md fields)
- Commit:
390f5c1d1e1f460422fcf8ff3d78da8a8aa27877. Both runs exported the head withgit archiveinto Windows Sandbox. The network probe reportedunreachable. - Commands (Debug):
- environment:
X2W_D3D12_DEBUG=1 - configure:
cmake --preset dev -DX2W_WITH_OPUS=OFF -DINTAKE_PYTHON=<venv python> -DOFFSCREEN_AGILITY_620_DIR=<Agility 1.620 dir> -DOFFSCREEN_WARP_DIR=<WARP 1.0.22 dir> - build:
cmake --build --preset dev --target startup_descriptor_history_check startup_indirect_draw_indexed - run 1:
ctest --preset dev --no-tests=error --output-on-failure -V -R '^startup_(descriptor_history_(model|(filter|exhaustion)_(warp|hardware))|mesh_argument_provenance_(warp|hardware)|indirect_mesh_(warp|hardware)|indirect_draw_indexed_(warp|hardware))$'. The leg ran again with--repeat until-fail:5. - run 2:
ctest --preset dev --no-tests=error --output-on-failure -V -R '^startup_descriptor_history_(model|(filter|exhaustion)_(warp|hardware))$'.
- environment:
- Run 1 results at the head: 11 passed, 0 failed, 0 skipped (77). The
--repeat until-fail:5leg also passed 11/11. Tests: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_mesh_argument_provenance_warp,startup_mesh_argument_provenance_hardware;startup_indirect_mesh_warp,startup_indirect_mesh_hardware;startup_indirect_draw_indexed_warp,startup_indirect_draw_indexed_hardware.
- Run 2 results at the head: 5 passed, 0 failed, 0 skipped (77):
startup_descriptor_history_model,filter_warp,filter_hardware,exhaustion_warp,exhaustion_hardware. - Adapters, as the fixtures print them:
- Microsoft Basic Render Driver,
driver: 1.0.22.0(app-local WARP); - NVIDIA GeForce RTX 4090 (sandbox vGPU),
driver: 32.0.16.1088.
- Microsoft Basic Render Driver,
- OS: Windows 11 Enterprise 10.0.26100, build 26100.
- Debug layer:
X2W_D3D12_DEBUG=1was set, and the in-box probe returnedD3D12GetDebugInterface hr=0x00000000;- each GPU fixture printed
adapter: ..., debug layer enabled, and the shim printedx2w-d3d12 debug layer: 0x00000000 enabled; - all 68
provenance debug info_queue=lines in the head leg readpresent, and no debug ERROR or CORRUPTION message was reported.
CI
Run 46710411577: the Windows job ran the pr preset, with 258 passed, 3 skipped (the existing xmem_placeholder_split_* controls) and 0 failed. It ran and passed 4 of this PR's tests:
startup_mesh_argument_provenance_warp;startup_descriptor_history_model;startup_descriptor_history_filter_warp;startup_descriptor_history_exhaustion_warp.
CI ran none of the _hardware tests. Those results come only from the sandbox runs above.
Verdict: request changes. The only blocking item is MUST 1, the bundled open #3321. The filter code passed every sandbox leg, and both mutants were caught.
|
Thank you @Not-Saii for the extensive review, validation, and testing! I understand the blocking concern with #3321 regarding coordination. I intended to provide a conflict-resolved integration while preserving their original author attribution, but I agree that the landing order needs coordination before merge. I'll seek agreement with them still, but haven't gotten a hold of them yet so far since I originally reached out the other day. I'll be updating the description to satisfy your SHOULD listed shortly. |
Summary
Refs #3310 and #3321.
Edits: Addressed SHOULDs and several NITs given by @Leyukaka and @Not-Saii
Extend descriptor history with optional heap-relative range filtering, allowing relevant descriptor operations to be captured without unrelated initialization activity consuming the diagnostic event budget.
The existing 8,192-record history limit can be exhausted during initialization or by a sufficiently large descriptor copy, preventing later operations relevant to GPU-written Mesh argument investigations from being recorded.
This contribution applies selection before event-budget consumption, validates descriptor attribution conservatively, and terminates diagnostic-only traversal after truncation.
Outstanding merge prerequisite — Not-Saii MUST 1
Coordination with #3321 remains unresolved. This follow-up addresses the technical review findings without changing the original contributor's attribution or the merge prerequisite. Publishing these improvements enables further technical review while coordination continues. This PR should not merge until either #3321 lands independently and this contribution is rebased, or an explicit agreement is found to supersede it.
The remaining application-integration acceptance criteria of #3310 and broader graphics-pipeline optimization remain separate work.
Dependency and integration status
This contribution depends on the descriptor-history implementation and Mesh argument provenance fixture introduced by @wish131400 in #3321.
The current branch contains three separately identifiable commits:
04a6c5a0390f5c1dThe original contribution is based on #3321 revision
029dfefef4c273b5d9c5565fbff1ee2acfd9a3ca.The original author was notified in #3321.
Outstanding findings specific to the original descriptor-history implementation remain separately identifiable from the filtering contribution.
Implementation
Diagnostic bounds
Selected registrations beyond the ordinary discovery limit are still reported.
The portable model reports a retained registry size of 73,856 bytes. The registry is constructed lazily and exists only in filtered mode.
The registry retains mapping metadata rather than 1,024 live COM references.
Reaching exactly 8,192 records does not itself constitute truncation. The truncation marker is emitted when an additional admissible matching record would exceed the budget.
Registration and attribution failures are handled conservatively. An incomplete trace is not represented as a complete descriptor history.
Runtime behavior
The diagnostic is disabled by default.
When the master switch is unset, the filter environment variable is not read and the filtered registry is not constructed.
The contribution adds no GPU commands or GPU synchronization requirements. Descriptor shadow publication, reference accounting and native descriptor operations retain their existing behavior.
Registry attribution is performed under
descriptor_lock. History admission and shadow publication operate under exclusivenote_lock.Registration planning precedes acquisition of
note_lock. Publication checks before and after shadow-row validation prevent stale or concurrently changed mappings from being accepted as verified lineage.Selected-row validation is bounded by the available history budget. Registration lookup is bounded by the retained registry capacity; this is not a claim of constant-time end-to-end descriptor lookup.
The disabled path retains cached configuration checks and diagnostic bookkeeping that returns early. Further reduction of this overhead is being evaluated separately in response to review feedback.
Configuration
Set both environment variables before starting the process:
Selector grammar:
TYPEview,sampler,rtv, ordsvVISIBILITYcpuorvisible; RTV and DSV must be CPU-onlyNODE_MASKCAPACITYORDINALFIRSTCOUNTOne or two selectors may be specified, separated by a semicolon.
Numeric fields use canonical unsigned 32-bit decimal values without whitespace, signs or leading zeroes. Capacity, ordinal and count must be positive. The selected interval must fit within the logical heap capacity.
Selectors must identify distinct heap keys, including their ordinals.
Mirrors are companions of their logical heaps rather than additional selector ordinals.
The filter is optional. Missing or empty input preserves legacy unfiltered recording behavior. Invalid nonempty input disables the diagnostic and reports a configuration error rather than falling back to unrestricted recording.
Configuration is cached for the lifetime of the process.
See
docs/experiments/descriptor-history-filter.mdfor the complete configuration grammar, attribution rules, capacity limits and reproduction details.Verification
Revision identity
Tested head:
390f5c1d1e1f460422fcf8ff3d78da8a8aa27877Upstream base:
158ef79422f296c48873bfe8123e1e040125dc0aThe final local regression campaigns were executed against the exact committed outgoing revision. The source checkout was verified clean before and after testing.
Historical development and mutation results are reported separately below and are not attributed to this final head.
Local test environment
The local build used the installed Windows D3D12 runtime and locally provisioned project dependencies.
OFFSCREEN_AGILITY_620_DIRandOFFSCREEN_WARP_DIRwere unset in both final build caches. No separately provisioned Agility SDK or app-local WARP package was required for this environment.Final committed revision results
The total includes overlapping tests executed under different configurations and presets; it does not represent 379 unique tests.
The three capability skips are existing Windows placeholder-fallback controls:
xmem_placeholder_split_controlxmem_placeholder_split_deployedxmem_placeholder_split_partialThe operating system exposes the placeholder bit, so the fallback paths are not exercised. These skips are not counted as passes.
Documentation-link, bidirectional-control and Git whitespace checks also passed during publication validation.
Primary regression results by adapter and configuration
startup_descriptor_history_modelstartup_descriptor_history_filter_warpstartup_descriptor_history_filter_hardwarestartup_descriptor_history_exhaustion_warpstartup_descriptor_history_exhaustion_hardwarestartup_mesh_argument_provenance_warpstartup_mesh_argument_provenance_hardwareAll seven primary regression tests passed in both configurations without capability skips.
These seven tests are included in, rather than additional to, each 59-test focused regression campaign.
Each focused campaign contains:
Every individual test in the complete focused inventory listed in the reproduction section below passed in both Debug and Release.
D3D12 debug-layer and info-queue verification
The archived verbose logs for the final committed revision were inspected for adapter debug-layer messages and the fixture's
provenance debug info_queue=observations.startup_mesh_argument_provenance_warpstartup_mesh_argument_provenance_hardwarestartup_descriptor_history_filter_warpstartup_descriptor_history_filter_hardwarestartup_descriptor_history_exhaustion_warpstartup_descriptor_history_exhaustion_hardwareAll 170 observed provenance info-queue records reported:
The corresponding adapter messages reported the debug layer enabled for all of these fixture executions.
No
info_queue=absentobservation was found in these final-head provenance campaigns.Debug-layer enablement was also reported by the following focused regression fixtures in both configurations:
startup_resource_retire_views_warp_debug1startup_resource_retire_views_hardware_debug1startup_resource_retire_views_no_mirror_control_warpstartup_mesh57_runtime_warpstartup_mesh57_runtime_hardwareThe
debug0resource-retirement cases intentionally exercise their corresponding debug-disabled configuration.Debug-layer claims here are fixture-specific rather than a blanket claim that every test in the PR preset uses the debug layer.
Expected diagnostic errors in deliberately failing upstream controls are distinguished from unexpected errors in the positive provenance fixtures.
Regression coverage
Portable model
startup_descriptor_history_modelverifies:The final-head Debug and Release model output includes:
Filtered GPU regression
Each
startup_descriptor_history_filter_{warp,hardware}test executes 19 cases.The five source-built Mesh provenance scenarios are exercised with source-only, destination-only and combined selectors. Additional positive cases cover an empty filter, disabled history, invalid configuration and an unmatched selector.
The regression checks exact descriptor-history sequences, registration selector masks, guest observations, resource backing identity, GPU argument records, fence observations and the existing pixel oracle.
History exhaustion regression
Each
startup_descriptor_history_exhaustion_{warp,hardware}test executes nine cases.The following results were verified against the archived final-head verbose logs:
The targeted case generates 10,000 unrelated descriptor events before the Mesh provenance sequence.
Legacy recording exhausts its budget during those unrelated events. Targeted recording retains the five relevant Mesh history records without truncation.
The sparse case independently exercises disjoint source and destination copy windows.
The noise-only case with 4,096 slots establishes that reaching exactly 8,192 admitted records does not prematurely emit the truncation marker.
Mesh argument provenance controls
The underlying #3321 fixture supplies the following source-built GPU oracle:
(2,1,1)recordsThe fixture checks matching resource identity, byte offsets, 12-byte argument records, completed fence observations, preserved guards and rendered pixels.
The positive scenario also runs with descriptor history disabled.
These are source-built regression fixtures. They do not establish the corresponding behavior in an actual application integration run.
Reproduction
Prerequisites and execution notes
The following workflow is adapted from the successfully executed final-head publication validation.
The build and test selections, configuration options, serial execution order and native-command error handling follow that campaign. Machine-specific paths have been parameterized for independent reproduction; the public-facing adaptation has not itself been rerun as a standalone script.
Use:
--tests-from-file.Follow the repository's
AGENTS.md,CONTRIBUTING.mdand dependency provisioning instructions.This reproduction uses offline CMake dependency configuration. Required dependencies must already be available locally.
Do not reuse build caches belonging to another checkout, another toolchain or another source revision.
Hardware without the required Mesh capabilities may produce capability skips. Such skips must be reported separately and do not constitute successful GPU validation.
If PowerShell execution policy prevents the reviewed repository scripts from running, and local policy permits it, a process-scoped setting can be used:
No system-wide execution-policy change, administrator privileges, Git ownership-check bypass or proprietary application materials are required.
Step 1 - Initialize and validate the environment
Run the following from the root of a clean checkout of the tested revision.
Replace the dependency-path values with the corresponding installations on the test machine.
The original local configuration used the Windows SDK paths shown above, MSVC x64, explicit Windows PowerShell discovery and provisioned offline dependencies.
Step 2 - Preserve existing evidence
Use a fresh report directory rather than overwriting existing validation artifacts.
Step 3 - Complete 59-test focused regression inventory
The following contains the exact test-name selection used for both final-head focused regression campaigns.
Every listed test passed in Debug and Release, with no failures or capability skips.
The original archived selection file has SHA-256:
The reproduced selection must contain the same 59 names. Its byte hash may differ due to text encoding or line-ending conventions.
Step 4 - Native-command handling
Windows PowerShell can treat redirected native stderr as PowerShell error records, including nonfatal compiler and configuration warnings.
The original successful publication validation used a checked native-command wrapper to retain diagnostic output while determining command success from the native exit code.
The following preserves that behavior and restores the caller's error-handling preference:
Step 5 - Configure, build and execute the complete validation campaign
This follows the final-head validation order:
The PR build and test presets use the Debug build directory.
Successful command completion is not, by itself, proof that all tests ran without capability skips. Inspect the JUnit reports as described below.
Step 6 - Verify individual test results
The following reporting step compares each JUnit result inventory with the corresponding pre-execution inventory and distinguishes passes, skips and failures.
The expected local results are 59/59 passes in both focused configurations and 258 passes with three existing OS-dependent capability skips in the PR smoke suite.
Other supported environments may produce different capability-skip results. Report those independently rather than treating them as successful execution.
Step 7 - Inspect debug-layer and info-queue evidence
Verbose logs retain fixture observations that may be truncated in default JUnit output.
The final local campaigns produced:
devreleaseprThe counts are specific to the observed test inventory and capability results.
An absent info queue must be reported as such and must not be represented as successful debug-layer error screening.
Step 8 - Preserve verification evidence
For independent review, retain the source revision, adapter information, configuration and build logs, exact test inventories, verbose test logs, JUnit reports and individual result summaries.
Only sanitized, source-built evidence should be shared publicly.
Minimal seven-test reproduction
For the descriptor-history and Mesh provenance test families only, the following shorter campaign may be used after the corresponding build presets have been successfully configured.
This selection contains seven tests per configuration. It is not the complete 59-test regression campaign reported above.
Historical mutation controls - prior upstream baseline
The following author-side mutation campaigns were performed during consolidated implementation validation against upstream base
959306d407e51781b8860d84b5060ab5a7113e58.These are historical development results, not mutation campaigns rerun against published head
390f5c1d.Portable mutations
Six isolated portable mutations were successfully detected by their intended semantic assertions:
The mutant executables compiled successfully using
/O2 /W4 /WXand failed their intended semantic checks with exit code 1.The accepted Debug and Release model executables passed again following the mutation campaign.
Integrated runtime mutations
Three representative runtime mutations were tested using the source-built fixture on both the physical RTX 4060 and WARP.
The integrated mutation campaign comprised 18 native fixture executions:
All 18 completed successfully at the native process level. The mutations were detected by descriptor-history assertions rather than compilation failures, crashes or unrelated GPU failures.
The positive GPU pixel result remained 8/8 throughout the campaign. Producer and consumer X dimensions remained 2, three fence observations were retained, and info queues were present.
These integrated runtime mutation tests were performed in Debug. No corresponding Release mutation campaign is claimed.
The historical results are retained as development evidence and are distinct from the final-head independent mutation results below.
Independent verification - published head
Not-Saii's independent review tested the exact published head:
390f5c1d1e1f460422fcf8ff3d78da8a8aa27877The reviewer exported the committed tree using
git archiveinto an isolated Windows Sandbox. The network probe reportedunreachable.Independent test environment
These are the reviewer's independently reported environment and results, rather than additional author-side test executions.
Independent baseline results
The reviewer reported 11 passed, zero failed and zero skipped:
startup_descriptor_history_modelstartup_descriptor_history_filter_warpstartup_descriptor_history_filter_hardwarestartup_descriptor_history_exhaustion_warpstartup_descriptor_history_exhaustion_hardwarestartup_mesh_argument_provenance_warpstartup_mesh_argument_provenance_hardwarestartup_indirect_mesh_warpstartup_indirect_mesh_hardwarestartup_indirect_draw_indexed_warpstartup_indirect_draw_indexed_hardwareThe same selection also passed the reviewer's
--repeat until-fail:5validation.A separate five-test descriptor-history selection passed without failures or skips.
The reviewer explicitly enabled
X2W_D3D12_DEBUG=1and reported that the in-box debug-interface probe returned0x00000000.All 68 provenance info-queue observations in the reviewer's head validation reported
present, with no reported debug-layer ERROR or CORRUPTION messages.Independent current-head mutation tests
The reviewer independently introduced two reverted-behavior mutations in isolated copies of the published revision.
M1 - Drop source-window selection
File:
src/startup_stubs/descriptor_history/retained_registry.hOriginal behavior:
filter::merge(result, window(a), window(b))Reviewer mutation:
merge(result, {}, window(b))The reviewer verified that both
d3d12_xs.dllandstartup_descriptor_history_check.exechanged following rebuilding.Five tests detected the regression:
startup_descriptor_history_modelstartup_descriptor_history_filter_warpstartup_descriptor_history_filter_hardwarestartup_descriptor_history_exhaustion_warpstartup_descriptor_history_exhaustion_hardwareThe remaining six tests passed.
After restoration, all 11 tests passed.
M2 - Bypass selection before budget consumption
File:
src/startup_stubs/d3d12_capture.inlOriginal condition:
if (history_legacy_enabled())Reviewer mutation:
if (history_legacy_enabled() || history_filtered())The reviewer verified that
d3d12_xs.dllchanged following rebuilding.Four runtime tests detected the regression:
startup_descriptor_history_filter_warpstartup_descriptor_history_filter_hardwarestartup_descriptor_history_exhaustion_warpstartup_descriptor_history_exhaustion_hardwareThe portable model remained passing, as expected for a mutation confined to runtime integration.
After restoration, all five selected tests passed.
These independent results demonstrate that the published head's regression suite detects both loss of source-range selection and incorrect admission of unrelated events before budget consumption.
The reviewer's exact build commands, test selections, mutation details and environment observations are available in the linked review.
Hosted CI
Windows CI run 46710411577
As independently confirmed in the review, the hosted Windows PR smoke job reported:
xmem_placeholder_split_*capability skips.The following directly relevant tests were included and passed:
startup_mesh_argument_provenance_warpstartup_descriptor_history_modelstartup_descriptor_history_filter_warpstartup_descriptor_history_exhaustion_warpThe hosted PR preset does not select the corresponding hardware tests.
Hardware validation is reported separately from the author's physical RTX 4060 runs and the reviewer's RTX 4090 sandbox vGPU runs.
Scope and limitations
Heap-relative ordinals are not stable identifiers across executions, configurations, adapters or concurrent registrations. Attribution is deliberately conservative when mapping identity cannot be established.
The diagnostic records CPU shadow publication order and pre-token-write guest samples. It does not establish:
View IDs may be reused. Matching numeric IDs alone do not establish persistent resource identity across an entire execution.
Registration discovery ordinarily reports the first 256 registrations, with additional selected registrations reported separately. The retained registry faults attribution beyond its supported capacity.
Incomplete-history reporting currently emits the first omission reason per process. The absence of additional omission messages is not proof that no additional operations were refused.
There is no end-of-process completeness receipt. Zero records or absence of a truncation marker is not proof of a complete history.
The portable model covers incomplete admission and refusal paths. The current integrated GPU fixtures primarily exercise tracked descriptor endpoints; a GPU incomplete-path control remains a proposed refinement.
No dedicated PR test exercises
X2W_D3D12_TABLE_LOCK=1in combination with targeted history.The original provenance fixture and targeted history provide diagnostic infrastructure relevant to #3310.
This contribution does not claim to satisfy the remaining application-integration acceptance criteria of #3310 or demonstrate full rendering compatibility.
Attribution
The underlying descriptor-history implementation and Mesh argument provenance fixture originate from @wish131400's PR #3321.
The original Git author identity and author date are preserved in the dependency integration commit.
Credit to:
Follow-up review remediation —
e2609c0eAddresses technical recommendations from @Leyukaka and @Not-Saii across 14 files (506 insertions, 100 deletions), without introducing external dependencies or additional GPU synchronization requirements.
Disabled-history overhead — Leyukaka SHOULD 1
Introduced a cached
history_active()check innote_view()andnote_copy(), bypassing history-specific shadow observations, stride calculations, reservation, and token sampling when history is disabled. Ordinary descriptor operations and resource-reference accounting remain unchanged.Optimized Release microbenchmarks against
390f5c1dcomprised 72 isolated process executions, 61.2 million API calls, and 288 million descriptor operations.A secondary optimization reduced the compiled
note_copy()function size from 2,398 to 1,727 bytes. However, further benchmarking across 384 million descriptor operations failed to resolve the bulk-copy regression, so the initial optimization was retained.The SHOULD is addressed structurally, although complete performance parity with the underlying dependency has not been achieved.
Further optimization is intentionally deferred until the graphics-rendering pipeline reaches a significant, reproducible functional milestone. Representative workloads will then allow more meaningful profiling of descriptor-copy distributions, lock contention, resource streaming, and CPU/GPU utilization.
The long-term objective remains near-zero disabled-diagnostic overhead and elimination of the observed bulk-copy regression without compromising runtime correctness.
These are historical R1.1 synthetic CPU-side measurements, not application FPS or end-to-end performance measurements of
e2609c0e.Omission reporting and discovery — Leyukaka SHOULD 2 / Not-Saii NIT 3
Portable model validation:
Historical isolated mutation controls detected regressions involving first-occurrence-only reporting, shared counters, incorrect reason classification, and restoration of the previous discovery cutoff.
No end-of-process completeness guarantee is introduced.
Integrated incomplete-history controls — Leyukaka NIT
Added
startup_descriptor_history_incomplete_{warp,hardware}with three source-built runtime controls:The untracked-source control verifies five native descriptor copies, omission counts of 1, 2, and 4, unchanged guest-token state, correct
(2,1,1)argument records, and 8/8 scene-color pixels.The overflow control verifies 1,024 retained registrations and five additional successful native heap allocations, with independent registry, view-attribution, and copy-attribution omission reporting.
The GPU oracle is verified before registry overflow; subsequent operations are checked through descriptor-token observations and device status.
All controls passed on hardware and WARP in Debug and optimized Release.
Documentation — Not-Saii NIT 4
Removed the redundant
docs/experiments.mdentry and updated the dedicated experiment note with revised diagnostic bounds, omission semantics, reproduction commands, and limitations.Documentation-link, bidirectional-control, and Git whitespace checks passed.
Consolidated verification — Not-Saii SHOULD 2
Each focused configuration includes 24 hardware, 27 WARP, and 10 other tests. The smoke suite includes 54 WARP passes and 205 other passes.
The three existing capability skips remain:
xmem_placeholder_split_controlxmem_placeholder_split_deployedxmem_placeholder_split_partialThese returned code 77 because the OS exposes the placeholder bit directly.
Primary regression results
startup_descriptor_history_modelstartup_descriptor_history_filter_warpstartup_descriptor_history_filter_hardwarestartup_descriptor_history_exhaustion_warpstartup_descriptor_history_exhaustion_hardwarestartup_descriptor_history_incomplete_warpstartup_descriptor_history_incomplete_hardwarestartup_mesh_argument_provenance_warpstartup_mesh_argument_provenance_hardwareD3D12 information-queue verification
Twelve additional incomplete-history executions passed with complete decoded stdout and stderr retained separately.
Including these additional controls, all 197 provenance information-queue observations reported
present, with no absent information queues.Reproduction and evidence integrity
The original 59-test focused inventory was expanded by the two incomplete-history registrations. The updated nine-test minimal reproduction is distinct from the complete 61-test selection:
The full focused inventory, individual test results, compiler flags, binary hashes, JUnit reports, and diagnostic logs are retained locally, with SHA-256 verification covering 63 evidence artifacts.
The tested cumulative source candidate was independently verified against the committed tree of
e2609c0e.Historical mutation results against
959306d4, subsequent R1 development mutations, and Not-Saii's independent validation against390f5c1dremain attributed to their respective tested revisions.All contributed implementation and validation fixtures are source-built. No proprietary application content or SDK materials are included.
AI-assisted implementation, testing and verification.