Shaders: lower scalar byte and halfword sign extension #182

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

@⁠GeaorgeAyvazov on GitHub · 2026-11-24 22:17 UTC · original
GeaorgeAyvazov:shader/scalar-sign-extension → main · +50 −0 · 2 files · 1 commits · open

The GFX10 decoder recognizes S_SEXT_I32_I8 and S_SEXT_I32_I16 but lowering rejects them. Reuse the byte/word selection helper to sign-extend the low byte or halfword into the scalar destination. AMD RDNA 2 ISA section 5.4 specifies that both preserve SCC.

The regression translates synthetic GFX10 compute shaders and reads the result back from a UAV. Six input words cover both sign boundaries and discarded high bits. Each runs with both incoming SCC states, consumed by a following scalar select. Before the patch the test stopped at Unsupported s_sext_i32_i8. The focused test passed on the RTX 3070 Ti Laptop and Intel Iris Xe using temporary explicit DXGI adapter selection and the hardware/WARP harness. The full shader library suite reported 204 passed, 7 failed, 2 ignored, with the same seven failures recorded on the base emitter. No game assets or title-level claims.

Implemented and tested with OpenAI Codex.

**@⁠GeaorgeAyvazov** on GitHub · 2026-11-24 22:17 UTC · [original](https://github.com/fxceless/victory-fork/pull/182) `GeaorgeAyvazov:shader/scalar-sign-extension` → `main` · +50 −0 · 2 files · 1 commits · open The GFX10 decoder recognizes S_SEXT_I32_I8 and S_SEXT_I32_I16 but lowering rejects them. Reuse the byte/word selection helper to sign-extend the low byte or halfword into the scalar destination. AMD RDNA 2 ISA section 5.4 specifies that both preserve SCC. The regression translates synthetic GFX10 compute shaders and reads the result back from a UAV. Six input words cover both sign boundaries and discarded high bits. Each runs with both incoming SCC states, consumed by a following scalar select. Before the patch the test stopped at Unsupported s_sext_i32_i8. The focused test passed on the RTX 3070 Ti Laptop and Intel Iris Xe using temporary explicit DXGI adapter selection and the hardware/WARP harness. The full shader library suite reported 204 passed, 7 failed, 2 ignored, with the same seven failures recorded on the base emitter. No game assets or title-level claims. Implemented and tested with OpenAI Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:37:43 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-shader/src/emit/valu_tests.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/182/head:github-bot/gh-182'
git switch 'github-bot/gh-182'

Merge

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