Shaders: lower scalar byte and halfword sign extension #182
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/182"
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 GeaorgeAyvazov on 2026-11-24T22:17:32Z.
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.
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.