DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

DXC doesn't support entrypoints in namespaces

Open tristanlabelle opened this issue 7 years ago • 2 comments

This is a very minor incompatibility with FXC. Repro: namespace foo { void main() {} } DXC /T vs_6_0 /E foo::main code.hlsl output: error: missing entry point definition FXC /T vs_5_0 /E foo::main code.hlsl output: [valid empty shader]

tristanlabelle avatar Jan 15 '19 23:01 tristanlabelle

that would require DXC to spec its name mangling though...

but would be good if DXC gave you a warning if it encounters a function with same name as your entry point which is in a namespace

Closing as behaves correctly. Both FXC and DXC don't support this, but DXC provides an error rather than producing an empty shader which seems preferable.

llvm-beanz avatar May 29 '24 17:05 llvm-beanz