GPU: zero the padding of blend and depth-stencil descriptions handed to the pipeline library #238

Open
github-bot wants to merge 1 commit from github-bot/gh-238 into main AGit
Owner

@⁠fffluffy-dev on GitHub · 2026-11-24 22:58 UTC · original
fffluffy-dev:gpu/pso-desc-padding → main · +83 −0 · 1 files · 1 commits · open

GraphicsState::read copies the title's D3D12_BLEND_DESC and D3D12_DEPTH_STENCIL_DESC whole, padding included (3 bytes after each target's RenderTargetWriteMask, 2 after StencilWriteMask). The library compares a loaded pipeline's description with the stored one byte for byte, so a pipeline whose padding differs between runs is refused, made again, and its store is refused as the name exists: it misses on every run. The library name itself is not affected (it hashes describe() text).

This zeroes that padding on the description handed to the host, after which nothing moves it: the graphics desc right after it is built, and the mesh stream (also the gaps between each subobject's type and its description). The idea is Marvisak/VIctory#1690's.

Validation (cargo-xwin, tests under Wine): cargo test -p victory-gpu 111 passed, 1 ignored, new test a_description_s_padding_is_zero_whatever_the_title_left_in_it (descriptions filled with 0x00/0xAB/0xFF before the fields are set come out byte-equal); clippy clean both ways; policy ok. To confirm on a real run: with the debug layer, messages 972/970 on a warm second run, and MADE against LOADED.

AI use: written with Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.

**@⁠fffluffy-dev** on GitHub · 2026-11-24 22:58 UTC · [original](https://github.com/fxceless/victory-fork/pull/238) `fffluffy-dev:gpu/pso-desc-padding` → `main` · +83 −0 · 1 files · 1 commits · open `GraphicsState::read` copies the title's `D3D12_BLEND_DESC` and `D3D12_DEPTH_STENCIL_DESC` whole, padding included (3 bytes after each target's `RenderTargetWriteMask`, 2 after `StencilWriteMask`). The library compares a loaded pipeline's description with the stored one byte for byte, so a pipeline whose padding differs between runs is refused, made again, and its store is refused as the name exists: it misses on every run. The library name itself is not affected (it hashes `describe()` text). This zeroes that padding on the description handed to the host, after which nothing moves it: the graphics desc right after it is built, and the mesh stream (also the gaps between each subobject's type and its description). The idea is Marvisak/VIctory#1690's. Validation (cargo-xwin, tests under Wine): `cargo test -p victory-gpu` 111 passed, 1 ignored, new test `a_description_s_padding_is_zero_whatever_the_title_left_in_it` (descriptions filled with 0x00/0xAB/0xFF before the fields are set come out byte-equal); clippy clean both ways; policy ok. To confirm on a real run: with the debug layer, messages 972/970 on a warm second run, and MADE against LOADED. **AI use:** written with Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:39:07 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/pipeline/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/238/head:github-bot/gh-238'
git switch 'github-bot/gh-238'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-238'
git switch 'github-bot/gh-238'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-238'
git switch 'github-bot/gh-238'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-238'
git switch 'main'
git merge --squash 'github-bot/gh-238'
git switch 'main'
git merge --ff-only 'github-bot/gh-238'
git switch 'main'
git merge 'github-bot/gh-238'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.