Skip to content

Attempting to pass a texture in the AS->MS payload struct causes crash #6620

Open

Description

@jeffnn

Description
Attempts to compile the following code results in an internal crash in the compiler.
(GetLoweredUDT() returns nullptr when passed the payload's type)
(This happened while writing tests. Not a customer scenario AFAIK)

Steps to Reproduce

// -T as_6_6 
struct MyPayload
{
    Texture2D tex;
};

[numthreads(1, 1, 1)]
void main(uint gid : SV_GroupID)
{
  MyPayload payload;
  DispatchMesh(1, 1, 1, payload);
}

Actual Behavior
Asserts, then crash

Environment

  • DXC version: dxcompiler.dll: 1.8 - 1.8.0.4583 (compiled from github top-of-tree, circa 5/10/2024)
  • Host Operating System Win11, insider flight

Activity

  1. added
    bug
    needs-triage
    on May 14, 2024
  2. pow2clk commented on May 15, 2024

    @pow2clk
    Collaborator

    Jeff's repro on godbolt: https://godbolt.org/z/MdoaKz686

    While it's not explicitly stated, the payload is essentially in groupshared memory. The closest the spec comes is to point out that "The size of the payload structure counts against groupshared memory limits". If I remember correctly, shaders with payloads not in groupshared won't run. Consequently, it makes sense that resources can't be in payloads since they can't be in groupshared. Crashing isn't okay of course.

    Out of curiosity, I tried putting resources in groupshared and had similar, but not identical failures: https://godbolt.org/z/8cfoesvos

  3. added
    crash
    incorrect-code
    and removed
    needs-triage
    on May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcrashincorrect-code

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions