[BUNDLE] DXIL emission and container robustness: 3 PRs, #343 #1303 #477 (rebuilt on main 70564ae) #1511

Open
github-bot wants to merge 6 commits from github-bot/gh-1511 into main AGit
Owner

@⁠MamaLeVrai on GitHub · 2026-11-24 18:39 UTC · original
MamaLeVrai:bundle/dxil-robustness → main · +551 −32 · 3 files · 6 commits · open

One PR in place of 3. After main moved, this bundle keeps the 3 of its earlier 5 PRs that still merge; the left-out ones are listed below. The earlier description follows, and may mention PRs or measurements that no longer apply. Five PRs on the DXIL the emitter writes and the DXBC it reads: bitcode fixes (duplicate latch folding, unreachable phi edges, constant caching), rejection of overlapping container parts, canonical system-value semantic names in the signature parts, bounds checks on the DXIL header, and the validator wrapper's null error blob, status and handle leaks. Merged on top of the stack #1319, #1402, #1492 and #1504. Every head is merged unchanged onto main (70564ae, after the maintainer's 28 commits of Nov 24, 22:36 CET), and the result is built and tested together.

For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a [BUNDLE] PR. The re-verification commands are below, so one run covers all of it.

What is inside

PR Author Head Title
#343 pedrofort 9459c12d2 Shaders: reject overlapping DXBC container parts
#1303 geiyiliyabumo 428725aae Shaders: bounds-check DXIL header offsets and recognize dword zero padding
#477 nathanbzrr bd59ba346 Shaders: fix DXIL validator UB on null error blobs, unchecked GetStatus, and COM/DLL handle leaks

Changes made while bundling

No PR was edited, and there is no hand resolution: a PR that does not merge as it is, is left out (below).

Left out, and why

Rebuilt on the new main. The earlier version of this bundle had 5 PRs; 3 merge here in order, each checked with clippy as it went in.

  • #1145: merges, but the workspace no longer compiles with it next to the others.
  • #1042: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-shader/src/emit/mod.rs.
  • #1202 (4 validator fixes, new container and validator tests): merges with the stack on its own, but it does not build together with the PRs of this bundle (in another order it conflicted with #477 in emit/validator.rs).
  • #697 (dead-code elimination in the bitcode emitter): conflicts with #1145 in emit/bitcode.rs.
  • #286 (accept D3D_MIN_PRECISION signature elements): conflicts in emit/mod.rs.
  • #1208, #1022, #1065: conflict with the stack in emit/mod.rs and emit/container.rs. #1208 and #1022 change the order of signature rows and the interpolation modes of one row, which #306 (in #1402) also handles, in another way, so reconciling them is a choice for the authors and the maintainer, not a mechanical merge. #1208 reports its gain with one validator version (12,231 of 12,231 vertex and pixel programs validate on its branch); the measurements posted on #1319 and #1402 (dxil.dll 1.8.2502.11) show main at 21,724 validated programs, so the gain depends on the validator version.
  • #326 (5,571 lines of DXBC/DXIL parser and SP3 robustness): conflicts in dxil.rs, emit/mod.rs and gfx10/sp3.rs.

Verification

Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain):

Check Result
cargo clippy --workspace --all-targets --locked -- -D warnings clean
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings clean
cargo test --workspace --locked 487 passed, 0 failed, 7 ignored (one run; main: 476 passed, 7 ignored)

The title was not run, so this says nothing about in-game effect. No game data is used or committed.

Re-verify in one go

git fetch https://github.com/MamaLeVrai/VIctory.git bundle/dxil-robustness
git checkout FETCH_HEAD
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

To confirm that no component PR moved since this was built, compare each Head above with gh pr view <n> --repo Marvisak/VIctory --json headRefOid. If one differs, the branch needs a rebuild: merge the new head in the same order.

If this lands

The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above.

AI-assisted (Claude Code); no game data.

🤖 Generated with Claude Code

**@⁠MamaLeVrai** on GitHub · 2026-11-24 18:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/1511) `MamaLeVrai:bundle/dxil-robustness` → `main` · +551 −32 · 3 files · 6 commits · open **One PR in place of 3.** After `main` moved, this bundle keeps the 3 of its earlier 5 PRs that still merge; the left-out ones are listed below. The earlier description follows, and may mention PRs or measurements that no longer apply. Five PRs on the DXIL the emitter writes and the DXBC it reads: bitcode fixes (duplicate latch folding, unreachable phi edges, constant caching), rejection of overlapping container parts, canonical system-value semantic names in the signature parts, bounds checks on the DXIL header, and the validator wrapper's null error blob, status and handle leaks. Merged on top of the stack #1319, #1402, #1492 and #1504. Every head is merged unchanged onto `main` (`70564ae`, after the maintainer's 28 commits of Nov 24, 22:36 CET), and the result is built and tested together. > For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a `[BUNDLE]` PR. The re-verification commands are below, so one run covers all of it. ## What is inside | PR | Author | Head | Title | |---|---|---|---| | #343 | pedrofort | `9459c12d2` | Shaders: reject overlapping DXBC container parts | | #1303 | geiyiliyabumo | `428725aae` | Shaders: bounds-check DXIL header offsets and recognize dword zero padding | | #477 | nathanbzrr | `bd59ba346` | Shaders: fix DXIL validator UB on null error blobs, unchecked GetStatus, and COM/DLL handle leaks | ## Changes made while bundling No PR was edited, and there is no hand resolution: a PR that does not merge as it is, is left out (below). ## Left out, and why **Rebuilt on the new `main`.** The earlier version of this bundle had 5 PRs; 3 merge here in order, each checked with clippy as it went in. - **#1145**: merges, but the workspace no longer compiles with it next to the others. - **#1042**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-shader/src/emit/mod.rs. - **#1202** (4 validator fixes, new container and validator tests): merges with the stack on its own, but it does not build together with the PRs of this bundle (in another order it conflicted with #477 in `emit/validator.rs`). - **#697** (dead-code elimination in the bitcode emitter): conflicts with #1145 in `emit/bitcode.rs`. - **#286** (accept `D3D_MIN_PRECISION` signature elements): conflicts in `emit/mod.rs`. - **#1208**, **#1022**, **#1065**: conflict with the stack in `emit/mod.rs` and `emit/container.rs`. #1208 and #1022 change the order of signature rows and the interpolation modes of one row, which #306 (in #1402) also handles, in another way, so reconciling them is a choice for the authors and the maintainer, not a mechanical merge. #1208 reports its gain with one validator version (12,231 of 12,231 vertex and pixel programs validate on its branch); the measurements posted on #1319 and #1402 (dxil.dll 1.8.2502.11) show `main` at 21,724 validated programs, so the gain depends on the validator version. - **#326** (5,571 lines of DXBC/DXIL parser and SP3 robustness): conflicts in `dxil.rs`, `emit/mod.rs` and `gfx10/sp3.rs`. ## Verification Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain): | Check | Result | |---|---| | `cargo clippy --workspace --all-targets --locked -- -D warnings` | clean | | `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` | clean | | `cargo test --workspace --locked` | 487 passed, 0 failed, 7 ignored (one run; `main`: 476 passed, 7 ignored) | The title was not run, so this says nothing about in-game effect. No game data is used or committed. ## Re-verify in one go ```powershell git fetch https://github.com/MamaLeVrai/VIctory.git bundle/dxil-robustness git checkout FETCH_HEAD cargo clippy --workspace --all-targets --locked -- -D warnings cargo clippy --workspace --all-targets --all-features --locked -- -D warnings cargo test --workspace --locked ``` To confirm that no component PR moved since this was built, compare each `Head` above with `gh pr view <n> --repo Marvisak/VIctory --json headRefOid`. If one differs, the branch needs a rebuild: merge the new head in the same order. ## If this lands The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above. AI-assisted (Claude Code); no game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:34:36 +00:00
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-24 18:54 UTC · original

Offline measurement on a retail dump

Result: no count changes against #1504. Head 289f241 and #1504 (0f3e062) agree program by program: 23,607 validated with both, 0 gained, 0 lost, and no failure reason changed.

Method: victory translate --validate --list on shaders.rpf (1.0.2.1), with dxil.dll 1.8.2502.11, over 25,889 programs.

This result is consistent with a robustness-only bundle: on this retail data, the bounds checks and container fixes do not reject or rescue any program. Correctness of the output is not measured here. No shader names or data are included, per the asset policy. AI-assisted (Claude Code).

**@⁠sinan-cmyk** on GitHub · 2026-11-24 18:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/1511#issuecomment-7141318015) ### Offline measurement on a retail dump **Result: no count changes against #1504.** Head 289f241 and #1504 (0f3e062) agree program by program: 23,607 validated with both, 0 gained, 0 lost, and no failure reason changed. Method: `victory translate --validate --list` on `shaders.rpf` (1.0.2.1), with dxil.dll 1.8.2502.11, over 25,889 programs. This result is consistent with a robustness-only bundle: on this retail data, the bounds checks and container fixes do not reject or rescue any program. Correctness of the output is not measured here. No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-24 19:10 UTC · original

Rebuilt on the new #1504 (which is on the new #1492 without #98): head 24c8a52, the same five PRs. Clippy (both runs) and cargo test --workspace pass (406 passed, 6 ignored). The measurement above was on the previous head. AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-24 19:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/1511#issuecomment-7141706409) Rebuilt on the new #1504 (which is on the new #1492 without #98): head `24c8a52`, the same five PRs. Clippy (both runs) and `cargo test --workspace` pass (406 passed, 6 ignored). The measurement above was on the previous head. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠Impre-visible on GitHub · 2026-11-24 19:11 UTC · original

Test report for this bundle on Linux with an NVIDIA Turing card (not a review of the code).

Setup: Arch Linux, kernel 6.18 LTS, GTX 1660 (6 GB, 32-lane waves only), NVIDIA 620.73.04, Wine from GE-Proton11-6 with the vkd3d-proton of Proton Experimental, Series X mode, diagnostics build, empty shader cache for each run.

Measured in the world (shaders that do not translate and are actually used, one run each, about 4 to 8 minutes):

Tree compute pixel mesh
main (ffe310e) + #542 #523 #530 #302 #1040 #1406 #1056 #1392 #1176 #1237 #1198 #1281 65 17 1
this bundle + #523 #530 #1040 #1406 #542 77 3 5
same + #302 #1056 #1392 #1407 #1516 #1388 #1189 77 1 1
this bundle + #1077 #1175 first, then the same list 66 1 1
  • cargo test -p victory-shader --lib on the last tree: 142 passed, 0 failed, 1 ignored.
  • Compute pipelines made 331 to 366 per run, 0 refused by the host, no device removal.
  • #1077 and #1175 merge onto this bundle with no conflict when they go in before #1388; after #1388, draw.rs needs the root UAV's dynamic slot to go through keep_dynamic (one line).
  • #542 conflicts with the bundle in emit/lower.rs (the raw-view match); both sides can be kept.
  • The final image is still dark in every tree; only the HUD minimap shows at frame 2048 in the third tree.
  • Remaining compute reasons in the last tree, by number of shaders: whole-wave section step not followed (16), address not from a root parameter (15), address from a root parameter that is no address (8), structured buffer of unknown stride (2), LDS write of bytes or halves (2).

Caveat: wave64 compute programs run here with a local switch that omits WaveSize (inexact on 32-lane hosts), so the counts say what translates, not what renders correctly.

**@⁠Impre-visible** on GitHub · 2026-11-24 19:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/1511#issuecomment-7141721114) Test report for this bundle on Linux with an NVIDIA Turing card (not a review of the code). **Setup:** Arch Linux, kernel 6.18 LTS, GTX 1660 (6 GB, 32-lane waves only), NVIDIA 620.73.04, Wine from GE-Proton11-6 with the vkd3d-proton of Proton Experimental, Series X mode, diagnostics build, empty shader cache for each run. **Measured in the world (shaders that do not translate and are actually used, one run each, about 4 to 8 minutes):** | Tree | compute | pixel | mesh | |---|---|---|---| | main (ffe310e) + #542 #523 #530 #302 #1040 #1406 #1056 #1392 #1176 #1237 #1198 #1281 | 65 | 17 | 1 | | **this bundle** + #523 #530 #1040 #1406 #542 | 77 | 3 | 5 | | same + #302 #1056 #1392 #1407 #1516 #1388 #1189 | 77 | 1 | 1 | | this bundle + #1077 #1175 first, then the same list | 66 | 1 | 1 | - `cargo test -p victory-shader --lib` on the last tree: 142 passed, 0 failed, 1 ignored. - Compute pipelines made 331 to 366 per run, 0 refused by the host, no device removal. - #1077 and #1175 merge onto this bundle with no conflict when they go in before #1388; after #1388, `draw.rs` needs the root UAV's dynamic slot to go through `keep_dynamic` (one line). - #542 conflicts with the bundle in `emit/lower.rs` (the raw-view match); both sides can be kept. - The final image is still dark in every tree; only the HUD minimap shows at frame 2048 in the third tree. - Remaining compute reasons in the last tree, by number of shaders: whole-wave section step not followed (16), address not from a root parameter (15), address from a root parameter that is no address (8), structured buffer of unknown stride (2), LDS write of bytes or halves (2). Caveat: wave64 compute programs run here with a local switch that omits `WaveSize` (inexact on 32-lane hosts), so the counts say what translates, not what renders correctly.
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-24 20:08 UTC · original

Thank you, Impre-visible, for the detailed run and the list. I built your list as one branch on top of this bundle: #1632 (#1077, #1175, #523, #530, #1040, #1406, #1392, #1407, #1516, #1388, #1189, #542; #1056 is already in #1319, and #1077 carries #489 and #302 in its own commits). Clippy (both runs) and cargo test --workspace pass on it (442 passed, two runs). What it took, all described in the PR: #1077 and #1175 merge onto the stack without a conflict but do not compile until the root UAV's dynamic slot goes through list.keep_dynamic (the one line you mentioned) and three HostShader literals get root_uavs; #542's bound is applied to the stack's raw-view branch, as you suggested (both sides kept); #1516 and #1175 add tests at the same spot of valu_tests.rs, both kept; and #1040's test needed a fix, see there. I did not include #1281, #1198, #1176 and #1237 from your first row. If your counts move with that branch (MamaLeVrai/VIctory, bundle/world-stack), a re-run would tell. AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-24 20:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/1511#issuecomment-7143088797) Thank you, Impre-visible, for the detailed run and the list. I built your list as one branch on top of this bundle: #1632 (#1077, #1175, #523, #530, #1040, #1406, #1392, #1407, #1516, #1388, #1189, #542; #1056 is already in #1319, and #1077 carries #489 and #302 in its own commits). Clippy (both runs) and `cargo test --workspace` pass on it (442 passed, two runs). What it took, all described in the PR: #1077 and #1175 merge onto the stack without a conflict but do not compile until the root UAV's dynamic slot goes through `list.keep_dynamic` (the one line you mentioned) and three `HostShader` literals get `root_uavs`; #542's bound is applied to the stack's raw-view branch, as you suggested (both sides kept); #1516 and #1175 add tests at the same spot of `valu_tests.rs`, both kept; and #1040's test needed a fix, see there. I did not include #1281, #1198, #1176 and #1237 from your first row. If your counts move with that branch (`MamaLeVrai/VIctory`, `bundle/world-stack`), a re-run would tell. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:29 UTC · original

Automated triage for the maintainers.

Proposed close: a bundle that only re-packages other people's pull requests. This branch combines other contributors' open PRs (#343, #1303, #477) through three clean merge commits, with no change of its own. Each component PR is open and can be reviewed and merged on its own, which keeps review and authorship with each author. The offline measurement posted here shows no count change and can be repeated on the individual PRs.

The description contains instructions addressed to agents verifying the PR (fetch, check out and run cargo); automated triage did not follow them.

This pull request will be closed in 48 hours unless the author pushes a change or a maintainer removes the triage: proposed close label.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/1511#issuecomment-7151958251) <!-- victory-triage v1 head=c4a10939a5708d239686088d080cfa1664b1f5e8 verdict=proposed-close at=2026-11-25T03:32:00Z --> Automated triage for the maintainers. **Proposed close: a bundle that only re-packages other people's pull requests.** This branch combines other contributors' open PRs (#343, #1303, #477) through three clean merge commits, with no change of its own. Each component PR is open and can be reviewed and merged on its own, which keeps review and authorship with each author. The offline measurement posted here shows no count change and can be repeated on the individual PRs. The description contains instructions addressed to agents verifying the PR (fetch, check out and run cargo); automated triage did not follow them. This pull request will be closed in 48 hours unless the author pushes a change or a maintainer removes the `triage: proposed close` label. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/1511/head:github-bot/gh-1511'
git switch 'github-bot/gh-1511'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1511'
git switch 'github-bot/gh-1511'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1511'
git switch 'github-bot/gh-1511'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1511'
git switch 'main'
git merge --squash 'github-bot/gh-1511'
git switch 'main'
git merge --ff-only 'github-bot/gh-1511'
git switch 'main'
git merge 'github-bot/gh-1511'
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!1511
No description provided.