microsoft / microsoft/DirectXShaderCompiler
Use interface, DXC crashed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
use interface simply, dxc will crash,but d3dcompile is ok
interface IQueueReadProxy
{
void GetReadPos(out uint readPos);
};
struct TtQueueReadProxyTest : IQueueReadProxy
{
void GetReadPos(out uint readPos)
{
readPos = 0;
}
uint Dequeue1()
{
uint readPos = 0;
GetReadPos(readPos);
return (uint)readPos;
}
};
[numthreads(1, 1, 1)]
void CS_ClusterCullingMain(uint DispatchThreadId : SV_DispatchThreadID)
{
TtQueueReadProxyTest q;
uint a = q.Dequeue1();
}
Steps to Reproduce
save code in test.hlsl
dxc -E CS_ClusterCullingMain -T cs_6_6 -Fo myshader.bin -Zi -Fd myshader.pdb -D MYDEFINE=1 test.hlsl
Actual Behavior
Internal compiler error: access violation. Attempted to read from address 0x00000000000000A8
Environment
- DXC version dxcompiler.dll: 1.8 - 1.7.0.4386 (a743e97f8)
- Host Operating System <!--- Host operating system and version ---> win10
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
Reproduce the crash with test.hlsl using the provided dxc command and confirm the access violation on the stated DXC version. Trace the compiler path handling the interface call and out parameter, then add a regression test that compiles the sample without an internal compiler error and verify the existing test suite passes.
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
- Needs clarification
- Newbie friendliness
- 28/100