diff --git a/src/reader/spirv/function.cc b/src/reader/spirv/function.cc index 0b0054f66c..ce244d4144 100644 --- a/src/reader/spirv/function.cc +++ b/src/reader/spirv/function.cc @@ -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(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; diff --git a/src/reader/spirv/parser_impl.cc b/src/reader/spirv/parser_impl.cc index 04029d3d12..94fe563c65 100644 --- a/src/reader/spirv/parser_impl.cc +++ b/src/reader/spirv/parser_impl.cc @@ -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 inputs;