Remove use of recent SPIRV-Tools functionality
reader/spirv/parser_impl.cc was using an overload of a function that's
recently added in SPIRV-Tools so rolling Tint would require rolling
SPIRV-Tools at the same time, which is not currently possible because of
a breaking change in spirv-headers.
Bug: chromium:1153258
Change-Id: I4e8cf87a3f11adbd8b6ef289260c6159faf9580c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34142
Commit-Queue: David Neto <dneto@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
diff --git a/src/reader/spirv/parser_impl.cc b/src/reader/spirv/parser_impl.cc
index d6ed08b..cc9bd28 100644
--- a/src/reader/spirv/parser_impl.cc
+++ b/src/reader/spirv/parser_impl.cc
@@ -431,10 +431,8 @@
}
const spv_context& context = tools_context_.CContext();
- const bool insert_extra_opline = false;
ir_context_ = spvtools::BuildModule(context->target_env, context->consumer,
- spv_binary_.data(), spv_binary_.size(),
- insert_extra_opline);
+ spv_binary_.data(), spv_binary_.size());
if (!ir_context_) {
return Fail() << "internal error: couldn't build the internal "
"representation of the module";
diff --git a/src/reader/spirv/parser_impl_test.cc b/src/reader/spirv/parser_impl_test.cc
index 29e5e3c..026cfe7 100644
--- a/src/reader/spirv/parser_impl_test.cc
+++ b/src/reader/spirv/parser_impl_test.cc
@@ -179,7 +179,7 @@
EXPECT_EQ(53u, s60.range.begin.column);
// After OpNoLine, revert back to instruction counting.
auto s1 = p->GetSourceForResultIdForTest(1);
- EXPECT_EQ(13u, s1.range.begin.line);
+ EXPECT_EQ(14u, s1.range.begin.line);
EXPECT_EQ(0u, s1.range.begin.column);
}