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

Merged
rastapasta merged 2 commits from upstream-pr/1809 into main 2026-11-29 08:16:53 +00:00
rastapasta commented 2026-11-29 00:14:48 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by rastapasta on 2026-11-29T00:14:48Z.


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.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5545941882 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1809). Originally posted by [rastapasta](https://github.com/rastapasta) on 2026-11-29T00:14:48Z. --- 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.
johanncastro759-crypto commented 2026-11-29 05:09:22 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by johanncastro759-crypto on 2026-11-29T05:09:22Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7251083691 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1809#issuecomment-7251083691). Originally posted by [johanncastro759-crypto](https://github.com/johanncastro759-crypto) on 2026-11-29T05:09:22Z. --- 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" />
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!1809
No description provided.