GPU: zero the padding of blend and depth-stencil descriptions handed to the pipeline library #238
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/238"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by fffluffy-dev on 2026-11-24T22:58:24Z.
GraphicsState::readcopies the title'sD3D12_BLEND_DESCandD3D12_DEPTH_STENCIL_DESCwhole, padding included (3 bytes after each target'sRenderTargetWriteMask, 2 afterStencilWriteMask). 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 hashesdescribe()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-gpu111 passed, 1 ignored, new testa_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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.