Revert the namer changes.

This CL reverts the changes to use the top level namer in the various
backends. This is causing issues when rolling into Dawn in the case
where the tint generator is used to create SPIR-V which is sent to
SPIRV-Cross but then generator and inspector aren't used. The entry
points end up being incorrect as SPIRV-Cross gets the renamed entry
points.

Change-Id: I4749e1d773f2bd9edcce83e63555f07a443d5ca5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37342
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair
2021-01-12 04:34:53 +00:00
committed by Commit Bot service account
parent b91e8a9fbe
commit 987376cd21
97 changed files with 3557 additions and 1468 deletions

View File

@@ -550,7 +550,7 @@ int main(int argc, const char** argv) {
#if TINT_BUILD_SPV_WRITER
if (options.format == Format::kSpirv || options.format == Format::kSpvAsm) {
writer = std::make_unique<tint::writer::spirv::Generator>(&mod);
writer = std::make_unique<tint::writer::spirv::Generator>(std::move(mod));
}
#endif // TINT_BUILD_SPV_WRITER
@@ -562,13 +562,13 @@ int main(int argc, const char** argv) {
#if TINT_BUILD_MSL_WRITER
if (options.format == Format::kMsl) {
writer = std::make_unique<tint::writer::msl::Generator>(&mod);
writer = std::make_unique<tint::writer::msl::Generator>(std::move(mod));
}
#endif // TINT_BUILD_MSL_WRITER
#if TINT_BUILD_HLSL_WRITER
if (options.format == Format::kHlsl) {
writer = std::make_unique<tint::writer::hlsl::Generator>(&mod);
writer = std::make_unique<tint::writer::hlsl::Generator>(std::move(mod));
}
#endif // TINT_BUILD_HLSL_WRITER