Skip to content

Unflattened RayDesc breaking HL->DXIL lowering #7434

Closed
@simoll

Description

@simoll

ScalarReplHLSL is missing transforms for some RayDesc users, making the RayDesc flattening unreliable. However, the RayDesc has to be flattened in the HL op parameter lists or the DXIL opcode translation will fail.

Steps to Reproduce
HLSL shaders (raygen) with the following snippet will fail. The HitObject::TraceRay prevents the flattening of the RayDesc.

    dx::HitObject hit1 = dx::HitObject::MakeMiss(RAY_FLAG_NONE, 0, ray);
    dx::MaybeReorderThread(hit1);
    dx::HitObject hit2 = dx::HitObject::TraceRay(topObject, RAY_FLAG_SKIP_TRIANGLES, 0xFF, 0, 0, 0, ray, payload);
    dx::MaybeReorderThread(hit2);

Actual Behavior
Assert/crash in TranslateHitObjectMake as the RayDesc isn't flattened in the MakeMiss HL op.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashneeds-triageAwaiting triage

    Type

    No type

    Projects

    Status

    Triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions