microsoft / microsoft/DirectXShaderCompiler
SamplerDescriptorHeap = ResourceDescriptorHeap crashes DXC
Open
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
Assigning the ResourceHeap to the SamplerHeap crashes DXC.
// RUN: %dxc -T cs_6_6 %s | FileCheck %s
[numthreads(1, 1, 1)]
void main() {
SamplerDescriptorHeap = ResourceDescriptorHeap;
}
$ dxc -T cs_6_6 repro.hlsl
DirectXShaderCompiler/tools/clang/lib/CodeGen/CodeGenTypes.cpp:795: const CGRecordLayout &clang::CodeGen::CodeGenTypes::getCGRecordLayout(const RecordDecl *): Assertion `Layout && "Unable to find record layout information for type"' failed.
Similar bug, but different stacktrace:
[numthreads(1, 1, 1)]
void main() {
ResourceDescriptorHeap = ResourceDescriptorHeap[0];
}
[numthreads(1, 1, 1)]
void main() {
ResourceDescriptorHeap[0];
}
[numthreads(1, 1, 1)]
void main() {
ResourceDescriptorHeap[0][1];
}
Environment
- DXC version: HEAD (128e6ce2be8f09539c97cf28d6066d9a6b32b15c)
- Host Operating System: Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied HLSL reproducers with dxc and inspect the assertion in tools/clang/lib/CodeGen/CodeGenTypes.cpp. Compare the assignment and indexing cases, then use the existing RUN/FileCheck pattern for regression coverage. Done means these inputs no longer crash DXC.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100