Skip to content

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

Open
steven-seagull27 wants to merge 1 commit into
Marvisak:mainfrom
steven-seagull27:fix/name-blend-register-states
Open

steven-seagull27 wants to merge 1 commit into
Marvisak:mainfrom
steven-seagull27:fix/name-blend-register-states

Conversation

@steven-seagull27

Copy link
Copy Markdown

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.

A disabled target loses its blend factors in the register image. Try copying or accumulating source alpha for ordinary RGB source-alpha interpolation. Accept either candidate only when CityHash64 matches the compact state requested by the pipeline.

Exercise both shared and independent blending with synthetic write masks. AI-assisted with Codex.
@cloph-dsp

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants