Remove internal usage of Context.

This CL removes all internal usage of the Context object. It is still
accepted as a parameter until we update Dawn, but all usage is removed.

The namer has been removed from the SPIR-V backend with this change and
the emitted names reverted to their non-modified version.

Change-Id: Ie6c550fab1807b558182cd7188ab6450a627f154
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34740
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
dan sinclair
2020-12-02 21:17:58 +00:00
committed by Commit Bot service account
parent 573d8939f4
commit 685cb02ea8
73 changed files with 362 additions and 420 deletions

View File

@@ -47,8 +47,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
tint::Source::File file("test.wgsl", str);
// Parse the wgsl, create the src module
tint::Context ctx;
tint::reader::wgsl::ParserImpl parser(&ctx, &file);
tint::reader::wgsl::ParserImpl parser(&file);
parser.set_max_errors(1);
if (!parser.Parse()) {
return 0;

View File

@@ -22,8 +22,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
std::vector<uint32_t> input(u32Data, u32Data + sizeInU32);
if (input.size() != 0) {
tint::Context ctx;
tint::reader::spirv::Parser parser(&ctx, input);
tint::reader::spirv::Parser parser(input);
parser.Parse();
}

View File

@@ -20,9 +20,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
std::string str(reinterpret_cast<const char*>(data), size);
tint::Source::File file("test.wgsl", str);
tint::Context ctx;
tint::reader::wgsl::Parser parser(&ctx, &file);
tint::reader::wgsl::Parser parser(&file);
parser.Parse();
return 0;