Make ShaderModule reflection go through EntryPointMetadata

PipelineBase now collects the EntryPointMetadata for all its
stages which makes the rest of the code agnostic to the entrypoint
name (except D3D12 and OpenGL that required transition hacks and
will be fixed in follow-up CLs).

Bug: dawn:216

Change-Id: I643da198cb2a20a9d94d805a2dc783d6d4346ae9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27260
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2020-09-02 15:57:39 +00:00
committed by Commit Bot service account
parent e9bc506e0a
commit 8ec8f31e3b
15 changed files with 167 additions and 137 deletions

View File

@@ -125,8 +125,6 @@ namespace dawn_native { namespace opengl {
DAWN_TRY(ExtractSpirvInfo(*compiler));
const ShaderModuleBase::ModuleBindingInfo& bindingInfo = GetBindingInfo();
// Extract bindings names so that it can be used to get its location in program.
// Now translate the separate sampler / textures into combined ones and store their info.
// We need to do this before removing the set and binding decorations.
@@ -182,6 +180,9 @@ namespace dawn_native { namespace opengl {
}
}
const EntryPointMetadata::BindingInfo& bindingInfo =
GetEntryPoint("main", GetMainEntryPointStageForTransition()).bindings;
// Change binding names to be "dawn_binding_<group>_<binding>".
// Also unsets the SPIRV "Binding" decoration as it outputs "layout(binding=)" which
// isn't supported on OSX's OpenGL.