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>
This commit is contained in:
Corentin Wallez 2020-11-27 15:36:23 +00:00 committed by Commit Bot service account
parent f32a3c1f35
commit 456aad3bce
2 changed files with 2 additions and 4 deletions

View File

@ -431,10 +431,8 @@ bool ParserImpl::BuildInternalModule() {
}
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";

View File

@ -179,7 +179,7 @@ TEST_F(SpvParserTest, Impl_Source_WithOpLine_WithOpNoLine) {
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);
}