Skip to content

Remove undefined behavior for ray queries #6761

@Vecvec

Description

@Vecvec

Is your feature request related to a problem? Please describe.
Currently the ray queries have lots of undefined behavior from the spirv spec that should be removed

Describe the solution you'd like
Prevent the undefined behaviour

Describe alternatives you've considered
Not remove it.

Additional context
Also see #6731 for some details of what can happen.
Current known undefined behavior*:

  • (Vulkan only) Anytime a ray misses and rayQueryGet*Intersection is called - [spirv] Stop naga causing undefined behavior in rayQueryGet*Intersection #6752
  • (Vulkan and DX12) Calling rayQueryGetCommittedIntersection or rayQueryGetCandidateIntersection when rayQueryProceed has not been called called on this ray query since it was initialized (or if the ray query has not been previously initialized).
    • Make this optional if module is trusted (This is avoidable).
  • (Vulkan and DX12) Calling rayQueryGetCommittedIntersection when rayQueryProceed's latest return on this ray query is considered Candidate (and the other way round too).
    • Make this optional if module is trusted (This is avoidable).
  • (Vulkan and DX12) Calling rayQueryProceed when rayQueryInitialize has not previously been called on this ray query.
    • Make this optional if module is trusted (This is avoidable).

*I don't know Metal's requirements and cannot find them easily listed, if anyone does know them (or can find them) could they post them below?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: correctnessWe're behaving incorrectlyarea: validationIssues related to validation, diagnostics, and error handlingbackend: vulkanIssues with Vulkanfeature: raytracingIssues with the Ray Tracing Native FeaturenagaShader Translatortype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions