Allow OpEntryPoint with duplicate names
polarina opened this issue · 1 comments
polarina commented
From https://github.com/gpuweb/spirv-execution-env/blob/master/execution-env.md#entry-points:
The Name of an OpEntryPoint: cannot be used by any other OpEntryPoint in the same module.
What is the reason for this restriction?
The SPIR-V specification allows duplicate names as long as their execution models are distinct. This allows one to, for example, combine vertex and fragment entry points into the same SPIR-V module without renaming the entry point's name for either.
dneto0 commented
We're restricted by WGSL here. In WGSL entry point names are "just" function names, and are not differentiated by which shader stage they run. So the name must not conflict with other function declarations or even variable declarations.