Shaders: lower native 16-bit buffer stores #426
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/426"
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 Marvisak/VIctory. Originally posted by ToxicmaggotRP on 2026-11-24T03:15:08Z.
Refs #274.
GFX10 exposes
buffer_store_shortandbuffer_store_short_d16_hi. The opcode table already decodes them, but the buffer lowering rejected both because it only handled dword and typed-format stores.rawBufferStore.i16, preserving the 2-byte write width.Validation status
cargo test -p victory-shader: not run; Rust toolchain unavailable in this environment.AI ASSISTED (CHATGPT)
Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T03:36:40Z.
Verified
4793ed5on Arch Linux x86_64 (rustc 1.98.1,cargo test -p victory-shader): 56 passed, 0 failed, 0 ignored.Not covered: Windows/Wine execution of the new store paths (shader tests here are parser/emit only) and title behaviour (no game data on this machine).
Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T03:50:54Z.
Re-checked the new head
e421755(“test(shader): verify short stores preserve adjacent halfwords”) on Arch Linux x86_64 (rustc 1.98.1):cargo test -p victory-shader56 passed, 0 failed, 0 ignored — same as4793ed5.Imported from Marvisak/VIctory. Originally posted by slint6614-dev on 2026-11-24T10:16:55Z.
AMD hardware check, Windows 11, Adrenalin driver: RX 9070 (RDNA4) and Ryzen 9600X iGPU (RDNA2, gfx1036), each picked as the hardware device of
run_cases(local adapter-selection patch, not part of this PR);cargo test -p victory-shader --release valu_testsat the PR head. Negative control: the PR's non-test files reverted to its merge base, its new tests kept.Both new tests fail on both AMD GPUs at the PR head, and the failure does not come from the hardware. The emitted module is rejected by the validator before it reaches the GPU:
The module uses a feature whose shader flag (0x20 here) is not declared. The same failure happens with
dxil.dllfrom Windows SDK 10.0.26100. Where nodxil.dllis found the check is skipped, which may be why it passed elsewhere.Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T13:19:31Z.
Review: COMMENTED
Test-merge with current main (
ffe310e) conflicts — needs a rebase. Main moved recently (PR #566 waterfall loops touchedlower.rs/resource.rs/valu_tests.rs), so shader PRs opened before it need rebasing. I'll re-review once it merges cleanly.upstream-sync referenced this pull request2026-11-25 10:07:34 +00:00
_d16and_d16_hiloads #2001Pull request closed