Tests: validate copied D3D12 descriptors through GPU-visible semantics #1355

Manually merged
github merged 2 commits from github-bot/gh-1355 into main 2026-11-29 08:21:53 +00:00 AGit
Owner

@⁠73N1X on GitHub · 2026-11-28 17:55 UTC · original
skAInet-labs:nv03/descriptor-semantic-validation → main · +190 −19 · 1 files · 2 commits · merged 2026-11-29 08:16 UTC

Summary

Replace the driver-specific comparison of opaque D3D12 descriptor bytes with a functional GPU-side regression test.

The new test executes a synthetic compute shader to verify that descriptors preserve their intended behavior, regardless of their internal driver representation.

Coverage

  • Thread-local staging descriptor isolation.
  • Correct buffer offset and dimensions.
  • First and last valid DWORD reads.
  • Out-of-bounds reads returning zero.
  • Descriptor replacement with a different offset and length.
  • Null descriptor behavior.
  • Staged descriptor copying enabled and disabled.
  • Device health after execution.

Validation

  • Standard configuration, staging enabled: PASS.
  • Standard configuration, staging disabled: PASS.
  • Diagnostics configuration, staging enabled: PASS.
  • Diagnostics configuration, staging disabled: PASS.
  • Cargo check in both configurations: PASS.
  • Staged asset policy: PASS.
  • Git diff check: PASS.

The full repository asset policy currently reports a pre-existing bindings.ini allowlist violation, unrelated to this patch.

Runtime impact

None expected. All changes are confined to the test module under #[cfg(test)]. Existing NVIDIA-specific optimizations and descriptor handling remain unchanged.

No game assets are included. NVIDIA hardware validation is still requested.

Based on upstream commit 9ce3cf9e.

**@⁠73N1X** on GitHub · 2026-11-28 17:55 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1355) `skAInet-labs:nv03/descriptor-semantic-validation` → `main` · +190 −19 · 1 files · 2 commits · merged 2026-11-29 08:16 UTC ## Summary Replace the driver-specific comparison of opaque D3D12 descriptor bytes with a functional GPU-side regression test. The new test executes a synthetic compute shader to verify that descriptors preserve their intended behavior, regardless of their internal driver representation. ## Coverage - Thread-local staging descriptor isolation. - Correct buffer offset and dimensions. - First and last valid DWORD reads. - Out-of-bounds reads returning zero. - Descriptor replacement with a different offset and length. - Null descriptor behavior. - Staged descriptor copying enabled and disabled. - Device health after execution. ## Validation - Standard configuration, staging enabled: PASS. - Standard configuration, staging disabled: PASS. - Diagnostics configuration, staging enabled: PASS. - Diagnostics configuration, staging disabled: PASS. - Cargo check in both configurations: PASS. - Staged asset policy: PASS. - Git diff check: PASS. The full repository asset policy currently reports a pre-existing `bindings.ini` allowlist violation, unrelated to this patch. ## Runtime impact None expected. All changes are confined to the test module under `#[cfg(test)]`. Existing NVIDIA-specific optimizations and descriptor handling remain unchanged. No game assets are included. NVIDIA hardware validation is still requested. Based on upstream commit `9ce3cf9e`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 17:57:19 +00:00
Author
Owner

@⁠babuakhil on GitHub · 2026-11-28 20:24 UTC · original

Ran this on NVIDIA hardware: GeForce RTX 3060, Windows 11, Rust 1.98.1 (pinned). Applied on top of current main (9300875); cherry-picks cleanly.

The new test passes on the RTX 3060, with the values the GPU read back exactly as expected:

Run first second null Result
staging on (default) a5000010 a500010f 0 400 a5000020 a500009f 0 200 0 0 0 0 pass
VICTORY_VIEW_COPY=0 same same same pass
--all-features (diagnostics) same same same pass

Whole workspace, with this stacked on #1290 (which fixes the clippy/policy failures already on main):

  • both clippy builds (-D warnings, with and without --all-features): pass
  • xtask policy: pass
  • cargo test --workspace --locked --no-fail-fast, three runs: 1129/1129, 1129/1129, and 1128/1129 (one watch::tests failure, below)

Without #1290 underneath, clippy and policy fail only on what already fails on main (the four lints and bindings.ini); this PR adds nothing there.

The watch failure is not this PR. cargo test -p victory-gpu --lib, 20 runs each side:

  • without this PR (main + #1290): 1 of 20 failed (what_is_put_in_beside_the_guards_is_told_at_every_view)
  • with it: 2 of 20 failed (what_the_kernel_writes_through_is_not_guarded_for_another_view, faults_that_take_no_lock_tell_the_same)

Same rate within noise, different watch tests each time: the existing flakiness mentioned on #1267.

One small thing: the test prints first:/second:/null: and NV03_GPU_SEMANTICS_PASS copy=… on every run. Handy for this round of hardware checks, but probably worth removing before merge, since the assertions already say all of it.

**@⁠babuakhil** on GitHub · 2026-11-28 20:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1355#issuecomment-7245258946) Ran this on NVIDIA hardware: **GeForce RTX 3060**, Windows 11, Rust 1.98.1 (pinned). Applied on top of current `main` (`9300875`); cherry-picks cleanly. **The new test passes on the RTX 3060**, with the values the GPU read back exactly as expected: | Run | first | second | null | Result | |---|---|---|---|---| | staging on (default) | `a5000010 a500010f 0 400` | `a5000020 a500009f 0 200` | `0 0 0 0` | pass | | `VICTORY_VIEW_COPY=0` | same | same | same | pass | | `--all-features` (diagnostics) | same | same | same | pass | **Whole workspace, with this stacked on #1290** (which fixes the clippy/policy failures already on `main`): - both clippy builds (`-D warnings`, with and without `--all-features`): pass - `xtask policy`: pass - `cargo test --workspace --locked --no-fail-fast`, three runs: 1129/1129, 1129/1129, and 1128/1129 (one `watch::tests` failure, below) Without #1290 underneath, clippy and policy fail only on what already fails on `main` (the four lints and `bindings.ini`); this PR adds nothing there. **The `watch` failure is not this PR.** `cargo test -p victory-gpu --lib`, 20 runs each side: - without this PR (`main` + #1290): 1 of 20 failed (`what_is_put_in_beside_the_guards_is_told_at_every_view`) - with it: 2 of 20 failed (`what_the_kernel_writes_through_is_not_guarded_for_another_view`, `faults_that_take_no_lock_tell_the_same`) Same rate within noise, different `watch` tests each time: the existing flakiness mentioned on #1267. One small thing: the test prints `first:/second:/null:` and `NV03_GPU_SEMANTICS_PASS copy=…` on every run. Handy for this round of hardware checks, but probably worth removing before merge, since the assertions already say all of it.
Author
Owner

@⁠73N1X on GitHub · 2026-11-28 23:45 UTC · original

Thanks @⁠babuakhil for the NVIDIA validation and regression analysis.

Addressed the review feedback in 65677f0 by removing the temporary diagnostic output. All semantic assertions and test logic remain unchanged.

Post-change validation on the RX 5700 XT:

  • Standard and diagnostics, staging enabled and disabled: all four tests passed.
  • Staged asset policy: passed.

The PR has been updated. No additional changes were introduced.

**@⁠73N1X** on GitHub · 2026-11-28 23:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1355#issuecomment-7247638101) Thanks @⁠babuakhil for the NVIDIA validation and regression analysis. Addressed the review feedback in `65677f0` by removing the temporary diagnostic output. All semantic assertions and test logic remain unchanged. Post-change validation on the RX 5700 XT: - Standard and diagnostics, staging enabled and disabled: all four tests passed. - Staged asset policy: passed. The PR has been updated. No additional changes were introduced.
Author
Owner

@⁠iBooM72 on GitHub · 2026-11-28 23:50 UTC · original

Tested 65677f04 on a GeForce RTX 4070 Ti 12 GB (driver 621.01), Windows 11 build 26300, Rust 1.98.1. Both commits cherry-pick cleanly onto main (d4b5d517).

The new test passed all 80 runs, with none skipped:

Build Staging on VICTORY_VIEW_COPY=0
Default 20/20 20/20
--all-features 20/20 20/20
  • GPU: all runs used VICTORY_ADAPTER=4070. One extra run per setup, with a temporary check of the D3D12 device's adapter LUID, confirmed the RTX 4070 Ti. That check wasn't in the 80 runs.
  • Clippy: no new warnings compared with main, with or without --all-features (run without -D warnings, because main already fails with it).

I ran only this test with the PR applied, not the full suite. On main without the PR, one full run gave 1,305 passed, 59 ignored and 1 failed: repository_passes_policy, because lower.rs is over the size limit (#1429).

**@⁠iBooM72** on GitHub · 2026-11-28 23:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1355#issuecomment-7247698422) Tested `65677f04` on a **GeForce RTX 4070 Ti 12 GB** (driver 621.01), Windows 11 build 26300, Rust 1.98.1. Both commits cherry-pick cleanly onto `main` (`d4b5d517`). **The new test passed all 80 runs, with none skipped:** | Build | Staging on | `VICTORY_VIEW_COPY=0` | |---|---:|---:| | Default | 20/20 | 20/20 | | `--all-features` | 20/20 | 20/20 | - **GPU:** all runs used `VICTORY_ADAPTER=4070`. One extra run per setup, with a temporary check of the D3D12 device's adapter LUID, confirmed the RTX 4070 Ti. That check wasn't in the 80 runs. - **Clippy:** no new warnings compared with `main`, with or without `--all-features` (run without `-D warnings`, because `main` already fails with it). I ran only this test with the PR applied, not the full suite. On `main` without the PR, one full run gave 1,305 passed, 59 ignored and 1 failed: `repository_passes_policy`, because `lower.rs` is over the size limit (#1429).
github manually merged commit fe846763e7 into main 2026-11-29 08:21:53 +00:00
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!1355
No description provided.