DirectXShaderCompiler
DirectXShaderCompiler copied to clipboard
DXC doesn't support entrypoints in namespaces
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]
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.