Skip to content

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

Merged
trustno1-coder merged 2 commits into
trustno1-coder:mainfrom
rastapasta:fix/shader-descriptor-data
Nov 29, 2026
Merged

trustno1-coder merged 2 commits into
trustno1-coder:mainfrom
rastapasta:fix/shader-descriptor-data

Conversation

@rastapasta

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added NVIDIA pr-fix Pull request: fixes a bug shaders Shader translation, preload or pipeline building labels Nov 29, 2026
@github-actions github-actions Bot changed the title [pr-fix][shaders][NVIDIA] Shaders: Translate bindless buffer address reads in ray-tracing shaders (fixes 3 previously failing translates) Shaders: Translate bindless buffer address reads in ray-tracing shaders (fixes 3 previously failing translates) Nov 29, 2026
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.
@johanncastro759-crypto

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NVIDIA pr-fix Pull request: fixes a bug shaders Shader translation, preload or pipeline building

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants