Game: name disabled blend states with separate alpha factors #3499

Open
steven-seagull27 wants to merge 1 commit from upstream-pr/3499 into main
steven-seagull27 commented 2026-11-27 10:33:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by steven-seagull27 on 2026-11-27T10:33:22Z.


Related to #2930.

When a render target has blending disabled, its register image can lose the RGB and alpha factors that the compact pipeline description still includes. blend_target already considers source-alpha interpolation for RGB. This adds two alpha equations for the same RGB case: copy the source alpha (ONE, ZERO) or add it to the destination alpha (ONE, ONE). A candidate still has to match the requested CityHash64 before it can name a state.

The generated regression exercises a shared blend description and an independent two-target description with different write masks. It fails on 63bcca43 and passes with this commit. All 16 victory-game tests, strict crate Clippy, and cargo xtask policy passed on Windows.

This change is independent of the rasterizer and depth-stencil work in #3047 and #3048.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5525137416 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3499). Originally posted by [steven-seagull27](https://github.com/steven-seagull27) on 2026-11-27T10:33:22Z. --- Related to #2930. When a render target has blending disabled, its register image can lose the RGB and alpha factors that the compact pipeline description still includes. `blend_target` already considers source-alpha interpolation for RGB. This adds two alpha equations for the same RGB case: copy the source alpha (`ONE, ZERO`) or add it to the destination alpha (`ONE, ONE`). A candidate still has to match the requested CityHash64 before it can name a state. The generated regression exercises a shared blend description and an independent two-target description with different write masks. It fails on `63bcca43` and passes with this commit. All 16 `victory-game` tests, strict crate Clippy, and `cargo xtask policy` passed on Windows. This change is independent of the rasterizer and depth-stencil work in #3047 and #3048. AI-assisted with Codex.
cloph-dsp commented 2026-11-27 10:51:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T10:51:09Z.


Independent local verification of PR #3499 at head 695471af5942bc7c5b1ba3eb0881c5efc667bd22 (merge base 63bcca43c6a00a758510398fa43096ce7e4f7df0).

  • Windows, rustc/cargo 1.100.0/MSVC, cargo test --locked, per-worktree CARGO_TARGET_DIR=D:\Victory-Contrib\target-3499-watch, CARGO_BUILD_JOBS=2.
  • Command: cargo test --locked -p victory-game --lib -- pipelines::tests::disabled_blends_keep_their_separate_alpha_factors --exact --test-threads=1 --quiet
  • Result: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 15 filtered out, exit 0.
  • Negative control: the new test name is absent on the merge base (git grep exit 1) and present on the PR head.
  • git diff --check 63bcca4 HEAD clean.

Only the named CPU/synthetic test was replayed; the full crate suite and GPU paths were not run. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only). No game data, assets, extracted shaders, DRM or decrypt used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7216381745 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3499#issuecomment-7216381745). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-27T10:51:09Z. --- Independent local verification of PR #3499 at head `695471af5942bc7c5b1ba3eb0881c5efc667bd22` (merge base `63bcca43c6a00a758510398fa43096ce7e4f7df0`). - Windows, rustc/cargo 1.100.0/MSVC, `cargo test --locked`, per-worktree `CARGO_TARGET_DIR=D:\Victory-Contrib\target-3499-watch`, `CARGO_BUILD_JOBS=2`. - Command: `cargo test --locked -p victory-game --lib -- pipelines::tests::disabled_blends_keep_their_separate_alpha_factors --exact --test-threads=1 --quiet` - Result: `test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 15 filtered out`, exit 0. - Negative control: the new test name is absent on the merge base (`git grep` exit 1) and present on the PR head. - `git diff --check 63bcca4 HEAD` clean. Only the named CPU/synthetic test was replayed; the full crate suite and GPU paths were not run. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only). No game data, assets, extracted shaders, DRM or decrypt used.
andrewpozdnakov7-jpg commented 2026-11-28 11:51:37 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T11:51:37Z.


I combined your exact 695471a with #3723 0478400 and #3713 13a711a in integration commit 1f2fa97. The merge is clean and preserves all three commits and their authors.

The disabled-blend alpha regression passed in both its shared and independent cases. Across 128 generated shapes, the blend enumerator produced the same 308,832 descriptors in the same order as your head. The register search also matched the named states, source labels, and unresolved sets in all four generated cases. In the 256-record control with distinct keys and both state kinds pending, the combined search took 54–59 ms versus 126–135 ms on your head across two optimized Windows runs.

All 16 game tests, strict Clippy, and the asset policy passed. @steven-seagull27, the combination is available for merge coordination. Please retain the Git authors if folding or rebasing the changes.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7238830003 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3499#issuecomment-7238830003). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T11:51:37Z. --- I combined your exact `695471a` with #3723 `0478400` and #3713 `13a711a` in [integration commit `1f2fa97`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/1f2fa97cca3fa998cffcd509a811c15b9896f796). The merge is clean and preserves all three commits and their authors. The disabled-blend alpha regression passed in both its shared and independent cases. Across 128 generated shapes, the blend enumerator produced the same 308,832 descriptors in the same order as your head. The register search also matched the named states, source labels, and unresolved sets in all four generated cases. In the 256-record control with distinct keys and both state kinds pending, the combined search took 54–59 ms versus 126–135 ms on your head across two optimized Windows runs. All 16 game tests, strict Clippy, and the asset policy passed. @steven-seagull27, the combination is available for merge coordination. Please retain the Git authors if folding or rebasing the changes. AI-assisted with OpenAI Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3499:upstream-pr/3499'
git switch 'upstream-pr/3499'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/3499'
git switch 'upstream-pr/3499'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3499'
git switch 'upstream-pr/3499'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3499'
git switch 'main'
git merge --squash 'upstream-pr/3499'
git switch 'main'
git merge --ff-only 'upstream-pr/3499'
git switch 'main'
git merge 'upstream-pr/3499'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!3499
No description provided.