New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are entryPoints namespaces per module or per stage per module? #1023
Comments
I think we should restrict the API and WGSL to require different names per stage. So, essentially, names in a module must be unique. This is because for HLSL we just output the functions, and having multiple functions with the same name is going to be troublesome. |
In SPIR-V they are namespaced per stage.
If the HLSL backend needs to rename a few functions internally, this is no big deal, and totally transparent from the user. However, if we force the names to be unique, converting from SPIR-V will not work for some of the modules. |
Good point, filed a bug in Tint to do the renaming in the HLSL backend. |
Discussed 2020-09-22
|
Going to close this as I believe it just falls under the general function names must be unique rule so there is nothing to change here. |
When writing WGSL it is possible to define multiple entrypoints in a single module. However what's the constraint on entry point names? Obviously two entry points for the same stage can't have the same name, but are entry points allowed to have the same name when they are for different stages.
I think it would make sense to have a namespace per stage, WDYT?
The text was updated successfully, but these errors were encountered: