Closed dubiousconst282 closed 2 weeks ago
I don't suppose this relates at all to the flag -fvk-use-entrypoint-name
, does it?
I usually have to add that flag into slangc in order to have entrypoint names "stick".
I don't think so, this happens before even linking and codegen. It's weird that looking up the entrypoint by name returns a non-null pointer, but an error result.
You can always use findAndCheckEntryPoint
to make any function treated as an entrypoint, even when they don't have [shader]
attribute.
I can take a look at this more if it is not expected change. It could be a regression.
I found a related code to this, https://github.com/shader-slang/slang/blob/2cc96907e4152291e0b6bca78a0bfbc69ddb8839/source/slang/slang-compiler.cpp#L2497
Basically, Slang looks for [shader(XXX)] as an EntryPointAttribute. If it fails to find it, it looks for [numthreads]. Based on my understanding the entry count should have been 1 in the given example/repro.
It looks like a regression,. I recently touched this logic in https://github.com/shader-slang/slang/pull/4336/files#diff-81b3d1428af174af2fd0c7a42eef8d9b7e0fd4b239851472649fd51df063add6, not sure if that is the cause for the regression.
This was actually caused by a linking error, as I was just replacing the DLLs in my app folder 🤦. My apologies.
IModule::getDefinedEntryPointCount()
and related APIs are returning 0 in the latest release / master branch. I have a minimal repro:Output in v2024.1.22:
EP: 00000256B939EF40 80070057 0
Output in v2024.1.21:
EP: 000001F4D9DF0160 00000000 1