shader: lower GFX10 xnor and swap ops #146

Closed
github-bot wants to merge 1 commit from gh-pr/146/head into gh-pr/146/base
Owner

@⁠Mesrine67 on GitHub · 2026-11-24 00:57 UTC · original
Mesrine67:fix/gfx10-xnor-swap → main · +33 −4 · 1 files · 1 commits · closed without merging

The GTA VI Xbox build 1.0.2.1 shader archive contains v_xnor_b32 and v_swap_b32, but the lowerer did not support them. This patch lowers v_xnor_b32 as a bitwise complement of XOR and v_swap_b32 as an exchange of the source and destination VGPR values for each active lane. It rejects modifiers that the instruction does not support.

Validation:

  • cargo test -p victory-shader — 57 passed.
  • cargo clippy -p victory-shader -- -D warnings — passed.
  • rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower.rs — passed.
  • Offline translation and Windows SDK DXIL validation on the local build 1.0.2.1 shaders.rpf: 22,156 emitted and 21,971 validated. The previous recorded baseline was 22,148 emitted and 21,963 validated. No D3D12 GPU pipelines or game executable were run.
  • Workspace-wide cargo fmt --check reports formatting diffs in other unchanged files; the focused check for the modified file passes.
**@⁠Mesrine67** on GitHub · 2026-11-24 00:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/146) `Mesrine67:fix/gfx10-xnor-swap` → `main` · +33 −4 · 1 files · 1 commits · closed without merging The GTA VI Xbox build 1.0.2.1 shader archive contains `v_xnor_b32` and `v_swap_b32`, but the lowerer did not support them. This patch lowers `v_xnor_b32` as a bitwise complement of XOR and `v_swap_b32` as an exchange of the source and destination VGPR values for each active lane. It rejects modifiers that the instruction does not support. Validation: - `cargo test -p victory-shader` — 57 passed. - `cargo clippy -p victory-shader -- -D warnings` — passed. - `rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower.rs` — passed. - Offline translation and Windows SDK DXIL validation on the local build 1.0.2.1 `shaders.rpf`: 22,156 emitted and 21,971 validated. The previous recorded baseline was 22,148 emitted and 21,963 validated. No D3D12 GPU pipelines or game executable were run. - Workspace-wide `cargo fmt --check` reports formatting diffs in other unchanged files; the focused check for the modified file passes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:52:09 +00:00
github-bot closed this pull request 2026-11-26 03:52:09 +00:00
Author
Owner

@⁠Mesrine67 on GitHub · 2026-11-24 01:02 UTC · original

This PR is superseded by upstream PR #58, which already merged v_xnor_b32 and v_swap_b32 lowering. I opened this while my local upstream/main was still at 062ad14; the subsequent fetch brought in the existing implementation. Closing to avoid a duplicate contribution.

**@⁠Mesrine67** on GitHub · 2026-11-24 01:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/146#issuecomment-7118694560) This PR is superseded by upstream PR #58, which already merged `v_xnor_b32` and `v_swap_b32` lowering. I opened this while my local `upstream/main` was still at 062ad14; the subsequent fetch brought in the existing implementation. Closing to avoid a duplicate contribution.

Pull request closed

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!146
No description provided.