shader: preserve scalar size bounds with wide loads #160

Closed
opened 2026-11-27 19:08:39 +00:00 by github-bot · 2 comments
Owner

@⁠krofty on GitHub · 2026-11-27 19:04 UTC · original

The opt-in WIDE scalar-buffer load lowering also takes count-one loads through its early-return path. That bypasses the existing default-on structure-size safety clamp for spilled-root reads at offset four.

Keep count-one loads on the existing scalar path; vectorize only multi-DWORD loads. This preserves scalar safety handling while retaining x4/x8/x16 vectorization.

Acceptance:

  • Preserve the scalar size clamp when WIDE is enabled.
  • Run the existing software-GPU scalar-buffer boundary regression with option masks 63 and 127, confirming actual dispatches rather than a skipped adapter.
  • Keep wave semantics, resource declarations and partial-resource-end behavior unchanged.
  • Validate before evaluating vectorized loads on NVIDIA, without changing output resolution or DLSS quality.

Claim: Codex / krofty will implement this isolated fix on its own branch. This supports the performance work at Snaacky/ztrx#249; it does not modify Snaacky's raw-pixel decoding or LDS work. PR stays open and unmerged. No performance gain is assumed.

**@⁠krofty** on GitHub · 2026-11-27 19:04 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/160) The opt-in WIDE scalar-buffer load lowering also takes count-one loads through its early-return path. That bypasses the existing default-on structure-size safety clamp for spilled-root reads at offset four. Keep count-one loads on the existing scalar path; vectorize only multi-DWORD loads. This preserves scalar safety handling while retaining x4/x8/x16 vectorization. Acceptance: - Preserve the scalar size clamp when WIDE is enabled. - Run the existing software-GPU scalar-buffer boundary regression with option masks 63 and 127, confirming actual dispatches rather than a skipped adapter. - Keep wave semantics, resource declarations and partial-resource-end behavior unchanged. - Validate before evaluating vectorized loads on NVIDIA, without changing output resolution or DLSS quality. Claim: Codex / krofty will implement this isolated fix on its own branch. This supports the performance work at Snaacky/ztrx#249; it does not modify Snaacky's raw-pixel decoding or LDS work. PR stays open and unmerged. No performance gain is assumed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 19:08:39 +00:00
Author
Owner

@⁠krofty on GitHub · 2026-11-27 19:18 UTC · original

Implemented in PR #177. Existing software-GPU boundary regression executed six actual dispatches under each option mask (63 and 127); all passed. Diagnostics build 294 passed via build.sh. Scalar clamp retention checked by source inspection. Releasing implementation claim; PR open and unmerged. No performance gain claimed.

**@⁠krofty** on GitHub · 2026-11-27 19:18 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/160#issuecomment-7226404720) Implemented in PR #177. Existing software-GPU boundary regression executed six actual dispatches under each option mask (63 and 127); all passed. Diagnostics build 294 passed via build.sh. Scalar clamp retention checked by source inspection. Releasing implementation claim; PR open and unmerged. No performance gain claimed.
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-27 21:08 UTC · original

Thanks. This is implemented in PR #177, so the change is tracked there now. Closing the issue to keep one place for it.

**@⁠trustno1-coder** on GitHub · 2026-11-27 21:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/160#issuecomment-7228172182) Thanks. This is implemented in PR #177, so the change is tracked there now. Closing the issue to keep one place for it.
This discussion has been locked. Commenting is limited to contributors.
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#160
No description provided.