From 456aad3bced07d62e2b3bbf13f52bd1ac76c4094 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Fri, 27 Nov 2020 15:36:23 +0000 Subject: [PATCH] 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 Auto-Submit: Corentin Wallez Reviewed-by: David Neto --- src/reader/spirv/parser_impl.cc | 4 +--- src/reader/spirv/parser_impl_test.cc | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/reader/spirv/parser_impl.cc b/src/reader/spirv/parser_impl.cc index d6ed08bbf7..cc9bd28758 100644 --- a/src/reader/spirv/parser_impl.cc +++ b/src/reader/spirv/parser_impl.cc @@ -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"; diff --git a/src/reader/spirv/parser_impl_test.cc b/src/reader/spirv/parser_impl_test.cc index 29e5e3c34a..026cfe7f14 100644 --- a/src/reader/spirv/parser_impl_test.cc +++ b/src/reader/spirv/parser_impl_test.cc @@ -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); }