shader: check OOB_SELECT 1 root-view elements #709

Manually merged
github merged 1 commit from github-bot/gh-709 into main 2026-11-29 08:22:34 +00:00 AGit
Owner

@⁠tharun-37 on GitHub · 2026-11-28 04:06 UTC · original
tharun-37:fix/root-view-oob-select → main · +166 −6 · 2 files · 1 commits · merged 2026-11-29 08:16 UTC

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).

**@⁠tharun-37** on GitHub · 2026-11-28 04:06 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/709) `tharun-37:fix/root-view-oob-select` → `main` · +166 −6 · 2 files · 1 commits · merged 2026-11-29 08:16 UTC 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).
An indexed access through a root-view buffer with OOB_SELECT 1 now touches nothing when the element is at or past num_records. Loads read zero and stores are dropped, while offsets stay signed and the other OOB_SELECT modes are left alone.

Fixes #690.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 04:11:59 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-28 04:27 UTC · original · approved these changes

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).

**@⁠Dukestar69** on GitHub · 2026-11-28 04:27 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/709#pullrequestreview-6095806066) · **approved these changes** 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).
github manually merged commit 861c2a7480 into main 2026-11-29 08:22:34 +00:00
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/trustno1-coder--VIctory-NVIDIA!709
No description provided.