shader: check OOB_SELECT 1 root-view elements #709

Merged
tharun-37 merged 1 commit from upstream-pr/709 into main 2026-11-29 08:16:58 +00:00
tharun-37 commented 2026-11-28 04:06:33 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tharun-37 on 2026-11-28T04:06:33Z.


Fixes #690.

Root-view buffer accesses with dword 3 OOB_SELECT 1 and \idxen\ now compare the element against
um_records. Out-of-range lanes address zero, so loads read 0 and stores are dropped. Offsets stay signed, and OOB_SELECT 0/2/3 and offset-only accesses are unchanged.

Adds a lowering test that the element check appears only for OOB_SELECT 1 with an index, plus regression checks against another mode and an offset-only access.

Validation: \cargo test -p victory-shader --locked; \cargo xtask policy.

AI-assisted (OpenCode).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5536506883 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/709). Originally posted by [tharun-37](https://github.com/tharun-37) on 2026-11-28T04:06:33Z. --- Fixes #690. Root-view buffer accesses with dword 3 OOB_SELECT 1 and \idxen\ now compare the element against \ um_records\. Out-of-range lanes address zero, so loads read 0 and stores are dropped. Offsets stay signed, and OOB_SELECT 0/2/3 and offset-only accesses are unchanged. Adds a lowering test that the element check appears only for OOB_SELECT 1 with an index, plus regression checks against another mode and an offset-only access. Validation: \cargo test -p victory-shader --locked\; \cargo xtask policy\. AI-assisted (OpenCode).
Dukestar69 commented 2026-11-28 04:27:10 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-28T04:27:10Z.

Review: APPROVED


LGTM — verified on Windows (RTX 5090):

  • cargo test -p victory-shader --lib emit::lower::tests:: passed (including oob_select_one_checks_only_indexed_elements_past_num_records)
  • cargo clippy -p victory-shader --lib -- -D warnings passed with 0 warnings
  • cargo xtask policy passed (294 files ok)

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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:review:6095806066 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/709#pullrequestreview-6095806066). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-28T04:27:10Z. **Review:** APPROVED --- LGTM — verified on Windows (RTX 5090): - `cargo test -p victory-shader --lib emit::lower::tests::` passed (including `oob_select_one_checks_only_indexed_elements_past_num_records`) - `cargo clippy -p victory-shader --lib -- -D warnings` passed with 0 warnings - `cargo xtask policy` passed (`294 files ok`) Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
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
trustno1-coder/VIctory-NVIDIA!709
No description provided.