victory-shader: handle s_buffer_load_dword in descriptor_data #1103

Closed
bartikele wants to merge 1 commit from upstream-pr/1103 into main
bartikele commented 2026-11-24 15:47:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by bartikele on 2026-11-24T15:47:08Z.


Handle Fields::Smem instructions starting with s_buffer_load_dword in Lower::descriptor_data when a buffer descriptor's words are read via s_buffer_load_dword* rather than s_load_dword*.

Rejects CBV descriptors with a constant buffer's descriptor read as data (consistent with S_LOAD_DWORD*) and maps s_buffer_load_dword* to ((11 | u, 0), None) (buffer descriptor).

Tested with:

  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings
  • cargo test -p victory-shader --locked
<!-- greyfinch-sync:Marvisak/VIctory:issue:6585707868 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1103). Originally posted by [bartikele](https://github.com/bartikele) on 2026-11-24T15:47:08Z. --- Handle `Fields::Smem` instructions starting with `s_buffer_load_dword` in `Lower::descriptor_data` when a buffer descriptor's words are read via `s_buffer_load_dword*` rather than `s_load_dword*`. Rejects CBV descriptors with `a constant buffer's descriptor read as data` (consistent with `S_LOAD_DWORD*`) and maps `s_buffer_load_dword*` to `((11 | u, 0), None)` (buffer descriptor). Tested with: - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings` - `cargo test -p victory-shader --locked`
upstream-sync closed this pull request 2026-11-24 17:03:18 +00:00
Aniseto commented 2026-11-24 17:04:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Aniseto on 2026-11-24T16:25:36Z.


Ran the whole victory-shader crate at cb9b4c9. The PR adds no test of its own, so this is a regression check rather than a proof of the new behaviour:

Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

cargo test -p victory-shader
120 passed; 0 failed; 1 ignored      (exit 0)

That matches main on this machine (ffe310e: 120 passed, 1 ignored), so the change does not disturb the existing lowering tests. What it cannot show is the new path itself: a frame that reaches s_buffer_load_dword through the descriptor data would be the real check, and I have no game data here.

For completeness: I ran the sibling PRs of this series on this machine too, #1090 (green, has its own comment here) and #1099 (green), so all three behave the same way here.

Not tested: the title (no game data), RDNA2/RDNA4 and Intel GPUs, release build.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the crate's tests, wrote this report; no game data was used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7137646660 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1103#issuecomment-7137646660). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-24T16:25:36Z. --- Ran the whole `victory-shader` crate at `cb9b4c9`. The PR adds no test of its own, so this is a regression check rather than a proof of the new behaviour: Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by `rust-toolchain.toml`), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` cargo test -p victory-shader 120 passed; 0 failed; 1 ignored (exit 0) ``` That matches `main` on this machine (`ffe310e`: 120 passed, 1 ignored), so the change does not disturb the existing lowering tests. What it cannot show is the new path itself: a frame that reaches `s_buffer_load_dword` through the descriptor data would be the real check, and I have no game data here. For completeness: I ran the sibling PRs of this series on this machine too, #1090 (green, has its own comment here) and #1099 (green), so all three behave the same way here. Not tested: the title (no game data), RDNA2/RDNA4 and Intel GPUs, release build. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash 1017** - checked out the PR's head commit in a detached worktree, built it, ran the crate's tests, wrote this report; no game data was used.
shortselow-byte commented 2026-11-24 17:04:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by shortselow-byte on 2026-11-24T16:41:38Z.


For triage: this makes the same change as #953 (handle s_buffer_load* uses in descriptor_data as a raw buffer, (11 | u, 0), still refusing a CBV). #953 is older and has already been run on several machines, including an AMD RDNA3 GPU, with a translation census of its effect.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7138062339 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1103#issuecomment-7138062339). Originally posted by [shortselow-byte](https://github.com/shortselow-byte) on 2026-11-24T16:41:38Z. --- For triage: this makes the same change as #953 (handle `s_buffer_load*` uses in `descriptor_data` as a raw buffer, `(11 | u, 0)`, still refusing a CBV). #953 is older and has already been run on several machines, including an AMD RDNA3 GPU, with a translation census of its effect.
bartikele commented 2026-11-24 17:04:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by bartikele on 2026-11-24T16:49:55Z.


Closing as a duplicate of #953, which already implements this change and has prior verification.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7138274177 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1103#issuecomment-7138274177). Originally posted by [bartikele](https://github.com/bartikele) on 2026-11-24T16:49:55Z. --- Closing as a duplicate of #953, which already implements this change and has prior verification.
Zipettte commented 2026-11-24 18:06:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:55Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at cb9b4c9: cargo test -p victory-shader passes, 120 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140057430 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1103#issuecomment-7140057430). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:01:55Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at cb9b4c9: `cargo test -p victory-shader` passes, 120 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1103
No description provided.