microsoft / microsoft/DirectXShaderCompiler
Resources in groupshared memory causes internal compiler error
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
Applying the groupshared qualifier onto resource globals results in an internal compiler error. This shouldn't be allowed, but it should produce a useful user error and not an internal casting failure.
Steps to Reproduce
Declare a texture and/or sampler with the groupshared qualifier and make use of them so they don't get eliminated.
https://godbolt.org/z/cbcq74x31
Actual Behavior
results in the error: "Internal Compiler error: cast() argument of incompatible type!"
Environment
- DXC version 1.8.2405
- Host Operating System win11
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 linked Godbolt reproducer with DXC 1.8.2405, using a texture or sampler declared with groupshared and referenced so it is not eliminated. Trace the compiler path that produces the incompatible cast failure; done means the invalid declaration receives a useful user-facing diagnostic instead of an internal compiler error.
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