microsoft / microsoft/DirectXShaderCompiler

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

Open
#6,620 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug crash incorrect-code
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

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

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 compiling the provided AS->MS payload reproducer with DXC and inspect the compiler path where GetLoweredUDT() receives the payload type. The issue names no source files or tests, so locate the relevant lowering code and establish regression coverage for this case. Done means the reproducer no longer asserts or crashes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.