spirv-reader: further cleanup of legacy IO

Bug: tint:508
Change-Id: I0c72cd06db70fa5275fff3bca2ed31febb9f49a9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55521
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
David Neto 2021-06-22 19:42:49 +00:00 committed by Tint LUCI CQ
parent c0c7915190
commit f9699b2248
2 changed files with 3 additions and 7 deletions

View File

@ -877,13 +877,8 @@ bool FunctionEmitter::Emit() {
bool make_body_function = true;
if (ep_info_) {
if (ep_info_->inner_name.empty()) {
// This is an entry point, and we don't want to emit it as a wrapper
// around its own body. Emit it as one function.
decl.name = ep_info_->name;
decl.decorations.emplace_back(
create<ast::StageDecoration>(Source{}, ep_info_->stage));
} else if (ep_info_->owns_inner_implementation) {
TINT_ASSERT(!ep_info_->inner_name.empty());
if (ep_info_->owns_inner_implementation) {
// This is an entry point, and we want to emit it as a wrapper around
// an implementation function.
decl.name = ep_info_->inner_name;

View File

@ -833,6 +833,7 @@ bool ParserImpl::RegisterEntryPoints() {
// Reuse the inner implementation owned by the first entry point.
inner_implementation_name = where->second[0].inner_name;
}
TINT_ASSERT(!inner_implementation_name.empty());
TINT_ASSERT(ep_name != inner_implementation_name);
tint::UniqueVector<uint32_t> inputs;