Remove support for multiple entrypoints with the same name

Previsouly having a ShaderModule with multiple entrypoints with the same
name and different stages was valid in Dawn. However it is disallowed by
the WGSL specification so change Dawn to index the ShaderModule's
entrypoints only by their name (instead of name and stage).

Bug: dawn:216
Change-Id: Id6fc80a03436b008c2f057bd30c70fdf240919e8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31665
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2020-11-05 13:25:16 +00:00
committed by Commit Bot service account
parent e87a8c466f
commit d42713de7a
9 changed files with 34 additions and 83 deletions

View File

@@ -108,8 +108,7 @@ namespace dawn_native { namespace opengl {
compiler.set_name(combined.combined_id, info->GetName());
}
const EntryPointMetadata::BindingInfo& bindingInfo =
GetEntryPoint(entryPointName, stage).bindings;
const EntryPointMetadata::BindingInfo& bindingInfo = GetEntryPoint(entryPointName).bindings;
// Change binding names to be "dawn_binding_<group>_<binding>".
// Also unsets the SPIRV "Binding" decoration as it outputs "layout(binding=)" which