Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jeffnn opened this issue May 14, 2024 · 1 comment
Open
Labels
bug Bug, regression, crash crash DXC crashing or hitting an assert incorrect-code Issues relating to handling of incorrect code
Milestone

Comments

@jeffnn
Copy link
Collaborator

jeffnn commented May 14, 2024

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
@jeffnn jeffnn added bug Bug, regression, crash needs-triage Awaiting triage labels May 14, 2024
@pow2clk
Copy link
Member

pow2clk commented May 15, 2024

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

@damyanp damyanp added crash DXC crashing or hitting an assert incorrect-code Issues relating to handling of incorrect code and removed needs-triage Awaiting triage labels May 16, 2024
@damyanp damyanp added this to the Backlog milestone May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash crash DXC crashing or hitting an assert incorrect-code Issues relating to handling of incorrect code
Projects
Status: Triaged
Development

No branches or pull requests

3 participants