DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

[SPIR-V] Unhandled Exception "Name is not a simple identifier" and others, but only when running in debugger

Open devshgraphicsprogramming opened this issue 1 year ago • 2 comments

Description

I was making a shader with the EXE/godbolt of the compiler, but now when I compile at runtime I get unhandled exception after unhandled exception

Steps to Reproduce

This godbolt: https://godbolt.org/z/WMsK7sP3d

Actual Behavior

Can't run with the debugger attached

Environment

  • DXC version: trunk as of 17/10/24
  • Host Operating System Godbolt

Made a 50% smaller repro https://godbolt.org/z/qojxv4c5M

The whole bug seems to be caused by me defining void WhittedTask::operator()() outside the struct

Might also affect DXIL/non-spirv output

I'm able to reproduce when using a debug build of the compiler. I reduced the test to:

struct WhittedTask
{
    void operator()();
};

void WhittedTask::operator()()
{
}

[numthreads(8,8,1)]
void main(uint32_t3 gl_GlobalInvocationID : SV_DispatchThreadID)
{
}

s-perron avatar Nov 18 '24 20:11 s-perron