fix(shader): retain scalar bounds with vector loads #177

Closed
krofty wants to merge 1 commit from upstream-pr/177 into main
krofty commented 2026-11-27 19:18:28 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by krofty on 2026-11-27T19:18:28Z.


Enabling vectorized scalar-buffer loads also routed count-one loads through an early return, bypassing the existing structure-size clamp for a spilled-root read at offset four.

Restrict the vector path to multi-DWORD loads. Single-DWORD reads keep the existing safety handling; x4/x8/x16 vectorization remains available.

Closes #160.

Validation: the existing software-GPU boundary regression passed with option masks 63 and 127 in separate processes, with six actual dispatch cases each, including reads across partial resource ends and out-of-bounds zeros. Diagnostics build 294 passed through build.sh. Independent source review and diff check passed. The clamp retention itself was checked by source inspection; the GPU fixture does not exercise the spilled-root clamp.

The opt-in in-game vectorization trial showed no performance gain so far. This is a safety fix, not a 30 FPS claim. PR stays open and unmerged.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5531935971 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/177). Originally posted by [krofty](https://github.com/krofty) on 2026-11-27T19:18:28Z. --- Enabling vectorized scalar-buffer loads also routed count-one loads through an early return, bypassing the existing structure-size clamp for a spilled-root read at offset four. Restrict the vector path to multi-DWORD loads. Single-DWORD reads keep the existing safety handling; x4/x8/x16 vectorization remains available. Closes #160. Validation: the existing software-GPU boundary regression passed with option masks 63 and 127 in separate processes, with six actual dispatch cases each, including reads across partial resource ends and out-of-bounds zeros. Diagnostics build 294 passed through build.sh. Independent source review and diff check passed. The clamp retention itself was checked by source inspection; the GPU fixture does not exercise the spilled-root clamp. The opt-in in-game vectorization trial showed no performance gain so far. This is a safety fix, not a 30 FPS claim. PR stays open and unmerged.

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
trustno1-coder/VIctory-NVIDIA!177
No description provided.