Open taxmancw opened 2 years ago
Thanks. This is definitely worth fixing.
Note for whatever contributor picks this up: our intention is to also support entry point functions as members of struct
types, so we should try to ensure that when we write the code to handle the namespace
case in this issue we also write code that is looking toward that option down the road.
I am putting together a test case for this feature, but I cannot seem to get dxc (when driven via the dxcompiler.dll
API) to recognize an entry point like the above. For a trivial compute shader, I get as output:
error: missing entry point definition
Can somebody confirm the expected versions of dxc for which entry points in namespaces work?
It appears that DXC is actually also lacking support for it and has yet to be addressed. https://github.com/Microsoft/DirectXShaderCompiler/issues/1854
Q3 language hardening
In the following example, specifying
Pixel::Main
as the entry point fails to compile in Slang, but will work in HLSL compilers FXC and DXC.