Shaders: Translate bindless buffer address reads in ray-tracing shaders (fixes 3 previously failing translates) #1809

Manually merged
github merged 2 commits from github-bot/gh-1809 into main 2026-11-29 08:20:42 +00:00 AGit
Owner

@⁠rastapasta on GitHub · 2026-11-29 00:14 UTC · original
rastapasta:fix/shader-descriptor-data → main · +1772 −1469 · 10 files · 2 commits · merged 2026-11-29 08:16 UTC

Fixes the descriptor-read failures reported in #154 and #1396.

What it changes

Five shadow-ray compute shaders read a guest buffer address from a descriptor selected at run time. The translator could recover the address from a fixed table slot. A computed heap slot failed with a descriptor read only as data.

The host now mirrors guest buffer and acceleration-structure addresses by heap slot, including each buffer view’s first-element offset. The emitter reads the mirror when it can prove that the four-dword load starts on a descriptor boundary and that the shader extracts an address in 256-byte units. Copies, replacements and clears update the mirrored address. Out-of-range indices read zero. Descriptor-data lowering moves into its own module to keep the main emitter within the repository’s file-size limit.

How it was tested

Full shader precompile Cached Refused
Base d4b5d51 25,745 244
This change 25,748 241
  • On a 32-lane NVIDIA RTX PRO 6000 Blackwell Workstation Edition (driver 621.14, Windows 11), the Half, Quarter and Eighth variants passed DXIL validation and created D3D12 compute pipelines. These offline checks run independently of the Series X/S rendering profile, resolution, DLSS, frame generation and in-title ray-tracing settings.
  • The Full variant reaches a separate wave64-to-wave32 limitation. It validates with a 64-lane translation target. FullAdaptive reaches a separate lane-mask error at 0xae80.
  • A synthetic compute dispatch returned the expected guest addresses and out-of-range zero on NVIDIA hardware and WARP. All 25,745 previously successful translations retained their module and binding fingerprints.
  • The two affected crates passed 900 tests, with 51 ignored. cargo xtask policy passed. Workspace Clippy still reports the unused colour binding and manual checked division seen in the base CI run.

Checked for overlap

  • Searched open PRs for the failure and the affected files, and checked #1138. PR #716 lists these five descriptor reads as outstanding. PRs #1504 and #1575 cover separate wave64 work.
**@⁠rastapasta** on GitHub · 2026-11-29 00:14 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1809) `rastapasta:fix/shader-descriptor-data` → `main` · +1772 −1469 · 10 files · 2 commits · merged 2026-11-29 08:16 UTC Fixes the descriptor-read failures reported in #154 and #1396. ## What it changes Five shadow-ray compute shaders read a guest buffer address from a descriptor selected at run time. The translator could recover the address from a fixed table slot. A computed heap slot failed with `a descriptor read only as data`. The host now mirrors guest buffer and acceleration-structure addresses by heap slot, including each buffer view’s first-element offset. The emitter reads the mirror when it can prove that the four-dword load starts on a descriptor boundary and that the shader extracts an address in 256-byte units. Copies, replacements and clears update the mirrored address. Out-of-range indices read zero. Descriptor-data lowering moves into its own module to keep the main emitter within the repository’s file-size limit. ## How it was tested | Full shader precompile | Cached | Refused | |---|---:|---:| | Base `d4b5d51` | 25,745 | 244 | | This change | 25,748 | 241 | - On a 32-lane NVIDIA RTX PRO 6000 Blackwell Workstation Edition (driver 621.14, Windows 11), the Half, Quarter and Eighth variants passed DXIL validation and created D3D12 compute pipelines. These offline checks run independently of the Series X/S rendering profile, resolution, DLSS, frame generation and in-title ray-tracing settings. - The Full variant reaches a separate wave64-to-wave32 limitation. It validates with a 64-lane translation target. FullAdaptive reaches a separate lane-mask error at `0xae80`. - A synthetic compute dispatch returned the expected guest addresses and out-of-range zero on NVIDIA hardware and WARP. All 25,745 previously successful translations retained their module and binding fingerprints. - The two affected crates passed 900 tests, with 51 ignored. `cargo xtask policy` passed. Workspace Clippy still reports the unused `colour` binding and manual checked division seen in the [base CI run](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46192325699). ## Checked for overlap - [x] Searched open PRs for the failure and the affected files, and checked #1138. PR #716 lists these five descriptor reads as outstanding. PRs #1504 and #1575 cover separate wave64 work.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 00:16:16 +00:00
Keep placed and ordinary acceleration-structure views and prove both computed heap offsets select whole descriptors. The synthetic dispatch covers single and summed indices on hardware and WARP.
Author
Owner

@⁠johanncastro759-crypto on GitHub · 2026-11-29 05:09 UTC · original

hi bro, this fork I didn't solve the problem;(
image

**@⁠johanncastro759-crypto** on GitHub · 2026-11-29 05:09 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1809#issuecomment-7251083691) hi bro, this fork I didn't solve the problem;( <img width="1310" height="541" alt="image" src="https://github.com/user-attachments/assets/d5aeef47-839a-451f-93c5-047b37054b3b" />
github manually merged commit 3e6e1247d0 into main 2026-11-29 08:20:42 +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!1809
No description provided.