microsoft / microsoft/DirectXShaderCompiler

[Feature Request] Validator should prevent AllocateRayQuery handles from being used as anything but handles

Open
#6,312 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement validation
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

Is your feature request related to a problem? Please describe.
A PIX customer had a shader in which an AllocateRayQuery handle (which is actually typed as i32) was included as a phi value, and the resulting PIX debug instrumentation tried to write the (apparently) i32 to its debug UAV, which caused the GPU driver (sensibly) to fail.

Describe the solution you'd like
It would have been great if the validator had noticed that I was trying to store an actual handle value.

Describe alternatives you've considered
Uh. Let PIX customers hit this, I guess :-).

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the validator logic for AllocateRayQuery handles and the handling of phi values, then trace how these handles are represented as i32. Define the validation cases that should reject using a handle as a non-handle value, and identify the existing validator tests that should demonstrate the rejected shader.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.