Shaders: a global or scratch load into LDS has no result register #2771

Open
github-bot wants to merge 3 commits from github-bot/gh-2771 into main AGit
Owner

@⁠Moon0755 on GitHub · 2026-11-25 20:09 UTC · original
Moon0755:fix/flat-lds-load-dst → main · +46 −2 · 3 files · 3 commits · open

Found by comparing gfx10/ with LLVM's AMDGPU backend.

Problem

A global or scratch load with lds set (bit 13) writes LDS, and the instruction has no VGPR destination: LLVM's LDS forms of these loads have has_vdst = 0 and their text has no vdst. gfx10/fields.rs gave every load a destination from bits 63-56, so the text began with a v0 the instruction does not have, and ir::build recorded a write to it.

#661 fixed the same for buffer loads (buffer_load_dword ... lds); the FLAT family was left.

Fix

For the global and scratch encodings, a load with lds has no dst. Flat is untouched (LLVM documents the bit as "LDS DMA for global and scratch").

Effect on the lowering

Lower::flat takes a global load's destination from dst and stops with "a global load result" when there is none. That alone did not refuse the program: a global_load_* was not counted as an instruction with an effect, so the error marked its empty write list as missing and the load into LDS was dropped silently. With lds set the instruction now counts as having an effect, and the program is refused (ShaderError::Unsupported, "a global load result"); emit::lower::tests::a_global_load_into_lds_is_refused checks it. Before this PR such a load was lowered as an ordinary load into v0. Neither is a translation of a load into LDS; the refusal at least writes no register the program never wrote. A scratch load with lds was refused already ("flat memory"). I have not checked whether a title program contains such a load: if the shader list changes with this, it is by those programs.

Test

gfx10::sp3::tests::loads_into_lds_have_no_result_register: four encodings from LLVM's llvm/test/MC/AMDGPU/gfx10_asm_flat.s, a global and a scratch load, each with a VGPR and with an SGPR address. For example [0x00,0xa4,0x30,0xdc,0x02,0x00,0x04,0x00] is global_load_dword v2, s[4:5] offset:1024 lds in LLVM; this project spells the offset inst_offset:1024.

Verification

GitHub Actions on windows-latest, on the fork, with the jobs narrowed to victory-shader and xtask:

  • with the change (run 45691069111): clippy in both profiles passed, 271 passed; 0 failed; 3 ignored;
  • the test without the change (run 45691069268): only the new test fails, each of the four texts with a leading v0.
  • the lowering test, added after review: without the refusal it fails with "a global load into LDS translated" (run 45814265375); with it 272 passed (run 45814931062); merged with main 63bcca4, 304 passed (run 45815122960).

Not checked: a run over title shaders.

Notes

  • Independent of #2761 (GWS operands) and #2765 (scratch ST mode): the three touch different lines of fields.rs, and their tests are in different places of sp3.rs.

— Fable

**@⁠Moon0755** on GitHub · 2026-11-25 20:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/2771) `Moon0755:fix/flat-lds-load-dst` → `main` · +46 −2 · 3 files · 3 commits · open Found by comparing `gfx10/` with LLVM's AMDGPU backend. ### Problem A global or scratch load with `lds` set (bit 13) writes LDS, and the instruction has no VGPR destination: LLVM's LDS forms of these loads have `has_vdst = 0` and their text has no `vdst`. `gfx10/fields.rs` gave every load a destination from bits 63-56, so the text began with a `v0` the instruction does not have, and `ir::build` recorded a write to it. #661 fixed the same for buffer loads (`buffer_load_dword ... lds`); the FLAT family was left. ### Fix For the global and scratch encodings, a load with `lds` has no `dst`. Flat is untouched (LLVM documents the bit as "LDS DMA for global and scratch"). ### Effect on the lowering `Lower::flat` takes a global load's destination from `dst` and stops with "a global load result" when there is none. That alone did not refuse the program: a `global_load_*` was not counted as an instruction with an effect, so the error marked its empty write list as missing and the load into LDS was dropped silently. With `lds` set the instruction now counts as having an effect, and the program is refused (`ShaderError::Unsupported`, "a global load result"); `emit::lower::tests::a_global_load_into_lds_is_refused` checks it. Before this PR such a load was lowered as an ordinary load into `v0`. Neither is a translation of a load into LDS; the refusal at least writes no register the program never wrote. A scratch load with `lds` was refused already ("flat memory"). I have not checked whether a title program contains such a load: if the shader list changes with this, it is by those programs. ### Test `gfx10::sp3::tests::loads_into_lds_have_no_result_register`: four encodings from LLVM's `llvm/test/MC/AMDGPU/gfx10_asm_flat.s`, a global and a scratch load, each with a VGPR and with an SGPR address. For example `[0x00,0xa4,0x30,0xdc,0x02,0x00,0x04,0x00]` is `global_load_dword v2, s[4:5] offset:1024 lds` in LLVM; this project spells the offset `inst_offset:1024`. ### Verification GitHub Actions on `windows-latest`, on the fork, with the jobs narrowed to `victory-shader` and `xtask`: - with the change ([run 45691069111](https://github.com/Moon0755/VIctory/actions/runs/45691069111)): clippy in both profiles passed, `271 passed; 0 failed; 3 ignored`; - the test without the change ([run 45691069268](https://github.com/Moon0755/VIctory/actions/runs/45691069268)): only the new test fails, each of the four texts with a leading `v0`. - the lowering test, added after review: without the refusal it fails with "a global load into LDS translated" ([run 45814265375](https://github.com/Moon0755/VIctory/actions/runs/45814265375)); with it `272 passed` ([run 45814931062](https://github.com/Moon0755/VIctory/actions/runs/45814931062)); merged with `main` `63bcca4`, `304 passed` ([run 45815122960](https://github.com/Moon0755/VIctory/actions/runs/45815122960)). Not checked: a run over title shaders. ### Notes - Independent of #2761 (GWS operands) and #2765 (scratch ST mode): the three touch different lines of `fields.rs`, and their tests are in different places of `sp3.rs`. — Fable
With `lds` set, a global or scratch load writes LDS and the instruction
has no VGPR destination (LLVM: `has_vdst = 0`, and the text has no
`vdst`). The decoder gave every load one, so the text began with a `v0`
the instruction does not have and the IR recorded a write to it. The
same was fixed for buffer loads in #661.

Test: `loads_into_lds_have_no_result_register`, encodings from LLVM's
gfx10_asm_flat.s.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:13:51 +00:00
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-25 20:22 UTC · original

Local verification on Windows / rustc 1.100.0 / MSVC, no game data, no GPU, no clippy/rustup.

  • \cargo test --locked -p victory-shader --lib loads_into_lds_have_no_result_register --quiet\ -> 1 passed (273 filtered).
  • \cargo test --locked -p victory-shader --lib gfx10::sp3::tests --quiet\ -> 9 passed (265 filtered).
  • \git diff --check origin/main..HEAD\ clean; diff 2 files +25/-1 in gfx10/fields.rs and gfx10/sp3.rs.
  • Negative control: the new test name is absent from origin/main (git grep no match).
  • The change ensures a global/scratch load with the lds bit has no VGPR destination. Full victory-shader lib not run because of the pre-existing crash reproduced on unmodified main.

AI-assisted (Hy4 flash).

**@⁠cloph-dsp** on GitHub · 2026-11-25 20:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/2771#issuecomment-7173575553) Local verification on Windows / rustc 1.100.0 / MSVC, no game data, no GPU, no clippy/rustup. - \cargo test --locked -p victory-shader --lib loads_into_lds_have_no_result_register --quiet\ -> 1 passed (273 filtered). - \cargo test --locked -p victory-shader --lib gfx10::sp3::tests --quiet\ -> 9 passed (265 filtered). - \git diff --check origin/main..HEAD\ clean; diff 2 files +25/-1 in gfx10/fields.rs and gfx10/sp3.rs. - Negative control: the new test name is absent from origin/main (git grep no match). - The change ensures a global/scratch load with the lds bit has no VGPR destination. Full victory-shader lib not run because of the pre-existing crash reproduced on unmodified main. AI-assisted (Hy4 flash).
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 20:37 UTC · original

Correct: with lds the global/scratch load targets LDS directly and has no VGPR destination, so dst must be None - it also stops a bogus register dependency being tracked. The four encodings come from LLVM's gfx10_asm_flat.s, good provenance.

**@⁠kotekompotek** on GitHub · 2026-11-25 20:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/2771#issuecomment-7173952144) Correct: with lds the global/scratch load targets LDS directly and has no VGPR destination, so dst must be None - it also stops a bogus register dependency being tracked. The four encodings come from LLVM's gfx10_asm_flat.s, good provenance.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 20:38 UTC · original

Reviewed and verified eab1a727 on Windows 11 against main (13f91ca).

  • Omitting dst for non-Flat (Global/Scratch) loads with bit(w0, 13) (lds=1) lines up consistently across fields.rs, sp3.rs (no bogus leading v0), ir.rs (no phantom register write), and lower.rs (explicitly rejects global_load_* ... lds instead of mis-lowering as a VGPR write).
  • cargo test --locked -p victory-shader --lib --features host gfx10::: 17/17 passed (including loads_into_lds_have_no_result_register); ir::: 9/9 passed.
  • cargo clippy --locked -p victory-shader --all-targets -- -D warnings (default & --features host): 0 warnings; cargo xtask policy: 184 files ok; clean git merge-tree vs 13f91ca, #2765, and #2768.
**@⁠fuzeofficlal** on GitHub · 2026-11-25 20:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/2771#issuecomment-7173959787) Reviewed and verified `eab1a727` on Windows 11 against `main` (`13f91ca`). - Omitting `dst` for non-`Flat` (`Global`/`Scratch`) loads with `bit(w0, 13)` (`lds=1`) lines up consistently across `fields.rs`, `sp3.rs` (no bogus leading `v0`), `ir.rs` (no phantom register write), and `lower.rs` (explicitly rejects `global_load_* ... lds` instead of mis-lowering as a VGPR write). - `cargo test --locked -p victory-shader --lib --features host gfx10::`: **17/17 passed** (including `loads_into_lds_have_no_result_register`); `ir::`: **9/9 passed**. - `cargo clippy --locked -p victory-shader --all-targets -- -D warnings` (default & `--features host`): **0 warnings**; `cargo xtask policy`: **184 files ok**; clean `git merge-tree` vs `13f91ca`, `#2765`, and `#2768`.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 23:22 UTC · original

Automated triage for the maintainers.

In crates/victory-shader/src/gfx10/fields.rs (Instruction::fields, the FLAT/global/scratch arm), a global or scratch load with the lds bit (bit 13) no longer gets a VGPR destination. The disassembly then drops the phantom leading v0, ir::build stops recording a register write the instruction does not make, and Lower::flat refuses such a load instead of lowering it as an ordinary load into v0. I checked the bit position against the GFX10 FLAT layout (dlc 12, lds 13, seg 15:14), that flat is left alone, and that the test words decode as global/scratch with lds set, matching LLVM's gfx10_asm_flat.s. This mirrors the earlier buffer-load fix (#661). CI (check) passes.

This is a recommendation for a maintainer to look, not an approval.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 23:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/2771#issuecomment-7177474642) <!-- victory-triage v1 head=eab1a7272930ed5fe1f99cf08fec13439c06e7d1 verdict=merge-candidate at=2026-11-25T23:22:26Z --> Automated triage for the maintainers. In `crates/victory-shader/src/gfx10/fields.rs` (`Instruction::fields`, the FLAT/global/scratch arm), a global or scratch load with the `lds` bit (bit 13) no longer gets a VGPR destination. The disassembly then drops the phantom leading `v0`, `ir::build` stops recording a register write the instruction does not make, and `Lower::flat` refuses such a load instead of lowering it as an ordinary load into v0. I checked the bit position against the GFX10 FLAT layout (dlc 12, lds 13, seg 15:14), that flat is left alone, and that the test words decode as global/scratch with `lds` set, matching LLVM's `gfx10_asm_flat.s`. This mirrors the earlier buffer-load fix (#661). CI (`check`) passes. This is a recommendation for a maintainer to look, not an approval. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠DenRakEiw on GitHub · 2026-11-26 00:49 UTC · original · approved these changes

Verified against origin/main (63bcca4):

  • Omitting the result register for global/scratch loads into LDS is clean and verified.
  • cargo test -p victory-shader gfx10::sp3::tests: 9/9 passed (including loads_into_lds_have_no_result_register).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: 0 warnings.
  • cargo xtask policy: 192 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠DenRakEiw** on GitHub · 2026-11-26 00:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/2771#pullrequestreview-6067058930) · **approved these changes** Verified against `origin/main` (`63bcca4`): - Omitting the result register for global/scratch loads into LDS is clean and verified. - `cargo test -p victory-shader gfx10::sp3::tests`: 9/9 passed (including `loads_into_lds_have_no_result_register`). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: 0 warnings. - `cargo xtask policy`: 192 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 09:44 UTC · original

NVIDIA full-suite run, to go with the reports above by DenRakEiw, cloph-dsp, fuzeofficlal, since none of them names a GPU run. Tested exact head eab1a72 (on its base 13f91ca).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 774 passed, 0 failed, 9 ignored.
  • The new tests ran and passed: loads_into_lds_have_no_result_register.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-26 09:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/2771#issuecomment-7188408121) NVIDIA full-suite run, to go with the reports above by DenRakEiw, cloph-dsp, fuzeofficlal, since none of them names a GPU run. Tested exact head `eab1a72` (on its base `13f91ca`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **774 passed, 0 failed, 9 ignored**. - The new tests ran and passed: `loads_into_lds_have_no_result_register`. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 11:39 UTC · original · requested changes

The GFX10 decoding change (crates/victory-shader/src/gfx10/fields.rs:412-415) and the four disassembly tests (crates/victory-shader/src/gfx10/sp3.rs:852-871) match the RDNA2/GFX10 lds encoding cleanly, and local checks pass (rustfmt, clippy, xtask policy, gfx10:: 17/17, ir:: 9/9, emit::lower::tests 27/27, and emit::tests 17/17 on RTX 5090 and WARP).

However, checking the lowering path on main (63bcca43) shows that global_load_* ... lds is silently dropped instead of rejected:

  • In crates/victory-shader/src/emit/lower.rs:819-821, Lower::flat returns Err("a global load result") when dst is None.
  • At crates/victory-shader/src/emit/lower.rs:3519-3527, effect excludes all global_load_* instructions (matches!(inst.fields, Fields::Flat { .. }) && !name.starts_with("global_load_")), even when lds is true.
  • As a result, crates/victory-shader/src/emit/lower.rs:3554-3563 absorbs Err("a global load result") into inst.writes (which is empty without dst) and returns Ok(()), silently omitting the LDS DMA write instead of emitting ShaderError::Unsupported.

Please treat Fields::Flat { lds: true, .. } (GLOBAL load-to-LDS) as having side effects in effect so lowering returns ShaderError::Unsupported (or lower the LDS write explicitly), and add a lowering regression test using one of the global_load_* ... lds encodings.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 11:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/2771#pullrequestreview-6073506493) · **requested changes** The GFX10 decoding change (`crates/victory-shader/src/gfx10/fields.rs:412-415`) and the four disassembly tests (`crates/victory-shader/src/gfx10/sp3.rs:852-871`) match the RDNA2/GFX10 `lds` encoding cleanly, and local checks pass (`rustfmt`, `clippy`, `xtask policy`, `gfx10::` 17/17, `ir::` 9/9, `emit::lower::tests` 27/27, and `emit::tests` 17/17 on RTX 5090 and WARP). However, checking the lowering path on `main` (`63bcca43`) shows that `global_load_* ... lds` is silently dropped instead of rejected: - In `crates/victory-shader/src/emit/lower.rs:819-821`, `Lower::flat` returns `Err("a global load result")` when `dst` is `None`. - At `crates/victory-shader/src/emit/lower.rs:3519-3527`, `effect` excludes all `global_load_*` instructions (`matches!(inst.fields, Fields::Flat { .. }) && !name.starts_with("global_load_")`), even when `lds` is `true`. - As a result, `crates/victory-shader/src/emit/lower.rs:3554-3563` absorbs `Err("a global load result")` into `inst.writes` (which is empty without `dst`) and returns `Ok(())`, silently omitting the LDS DMA write instead of emitting `ShaderError::Unsupported`. Please treat `Fields::Flat { lds: true, .. }` (GLOBAL load-to-LDS) as having side effects in `effect` so lowering returns `ShaderError::Unsupported` (or lower the LDS write explicitly), and add a lowering regression test using one of the `global_load_* ... lds` encodings.
Author
Owner

@⁠Moon0755 on GitHub · 2026-11-26 12:05 UTC · original

You were right, and the description was wrong: it said such a load "is now refused", while effect left every global_load_* out, so the error marked an empty write list and the lowering went on without the LDS write.

Head 26006ae: a global load with lds counts as an instruction with an effect, so the program is refused with "a global load result". New test emit::lower::tests::a_global_load_into_lds_is_refused, on the global_load_dword ... lds encoding from the disassembly test. A scratch load with lds was already refused ("flat memory").

CI on the fork: the test alone fails with "a global load into LDS translated" (run 45814265375); with the change 272 pass (run 45814931062); merged with main 63bcca4 304 pass (run 45815122960). The description is corrected.

— Devin & Fable

**@⁠Moon0755** on GitHub · 2026-11-26 12:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/2771#issuecomment-7191561216) You were right, and the description was wrong: it said such a load "is now refused", while `effect` left every `global_load_*` out, so the error marked an empty write list and the lowering went on without the LDS write. Head `26006ae`: a global load with `lds` counts as an instruction with an effect, so the program is refused with "a global load result". New test `emit::lower::tests::a_global_load_into_lds_is_refused`, on the `global_load_dword ... lds` encoding from the disassembly test. A scratch load with `lds` was already refused ("flat memory"). CI on the fork: the test alone fails with "a global load into LDS translated" ([run 45814265375](https://github.com/Moon0755/VIctory/actions/runs/45814265375)); with the change 272 pass ([run 45814931062](https://github.com/Moon0755/VIctory/actions/runs/45814931062)); merged with `main` `63bcca4` 304 pass ([run 45815122960](https://github.com/Moon0755/VIctory/actions/runs/45815122960)). The description is corrected. — Devin & Fable
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 12:58 UTC · original · approved these changes

The regular lowering path now returns ShaderError::Unsupported for a GLOBAL load into LDS: decoding omits the VGPR destination (crates/victory-shader/src/gfx10/fields.rs:396-427), and checking Fields::Flat { lds: true, .. } in effect (crates/victory-shader/src/emit/lower.rs:3312-3322) ensures the missing-result error propagates instead of being silently dropped. SCRATCH loads still take the flat memory refusal path, and ordinary GLOBAL loads keep their existing destination and lowering behavior.

The four disassembly cases (sp3.rs:853-871) and a_global_load_into_lds_is_refused (emit/lower.rs:10709-10723) cover the issue cleanly (lower.rs merged onto 63bcca43 is 521,370 bytes, 2,918 bytes under the limit). Note for integration: when combining with #2874, remember to carry Fields::Flat { lds: true, .. } into the shared has_side_effect predicate so whole-wave sections reject it too.

Local verification on 26006ae4d149: xtask policy (184 files ok), cargo clippy -p victory-shader --all-targets / --all-features, gfx10:: (17 passed), ir:: (9 passed), emit::lower::tests (28 passed), and emit::tests (17 passed on both RTX 5090 and VICTORY_WARP=1). Approving to clear the earlier request for changes.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 12:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/2771#pullrequestreview-6074517825) · **approved these changes** The regular lowering path now returns `ShaderError::Unsupported` for a GLOBAL load into LDS: decoding omits the VGPR destination (`crates/victory-shader/src/gfx10/fields.rs:396-427`), and checking `Fields::Flat { lds: true, .. }` in `effect` (`crates/victory-shader/src/emit/lower.rs:3312-3322`) ensures the missing-result error propagates instead of being silently dropped. SCRATCH loads still take the `flat memory` refusal path, and ordinary GLOBAL loads keep their existing destination and lowering behavior. The four disassembly cases (`sp3.rs:853-871`) and `a_global_load_into_lds_is_refused` (`emit/lower.rs:10709-10723`) cover the issue cleanly (`lower.rs` merged onto `63bcca43` is `521,370` bytes, 2,918 bytes under the limit). Note for integration: when combining with `#2874`, remember to carry `Fields::Flat { lds: true, .. }` into the shared `has_side_effect` predicate so whole-wave sections reject it too. Local verification on `26006ae4d149`: `xtask policy` (`184 files ok`), `cargo clippy -p victory-shader --all-targets` / `--all-features`, `gfx10::` (`17 passed`), `ir::` (`9 passed`), `emit::lower::tests` (`28 passed`), and `emit::tests` (`17 passed` on both RTX 5090 and `VICTORY_WARP=1`). Approving to clear the earlier request for changes.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2771/head:github-bot/gh-2771'
git switch 'github-bot/gh-2771'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2771'
git switch 'github-bot/gh-2771'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2771'
git switch 'github-bot/gh-2771'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2771'
git switch 'main'
git merge --squash 'github-bot/gh-2771'
git switch 'main'
git merge --ff-only 'github-bot/gh-2771'
git switch 'main'
git merge 'github-bot/gh-2771'
git push origin 'main'
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!2771
No description provided.