From 2ebcb93cb36c767b0fb65fbb290e6efb4cb10516 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Fri, 10 Sep 2021 15:25:13 +0000 Subject: [PATCH] reader/spiv: Fix typo in entry-point IO sorting We were sorting the inputs twice. Also make use the UniqueVector::operator std::vector() to simplify the code a little. Doesn't appear to change any tests. Just spotted while looking through code. Change-Id: Iddb433b9c8c429f32b40a10cf466c712fde7a317 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/63701 Auto-Submit: Ben Clayton Commit-Queue: David Neto Kokoro: Kokoro Reviewed-by: David Neto --- src/reader/spirv/parser_impl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/reader/spirv/parser_impl.cc b/src/reader/spirv/parser_impl.cc index bec3e4aeed..588cba38a7 100644 --- a/src/reader/spirv/parser_impl.cc +++ b/src/reader/spirv/parser_impl.cc @@ -902,10 +902,10 @@ bool ParserImpl::RegisterEntryPoints() { } } // Save the lists, in ID-sorted order. - std::vector sorted_inputs(inputs.begin(), inputs.end()); - std::sort(sorted_inputs.begin(), sorted_inputs.end()); - std::vector sorted_outputs(outputs.begin(), outputs.end()); + std::vector sorted_inputs(inputs); std::sort(sorted_inputs.begin(), sorted_inputs.end()); + std::vector sorted_outputs(outputs); + std::sort(sorted_outputs.begin(), sorted_outputs.end()); const auto ast_stage = enum_converter_.ToPipelineStage(stage); GridSize wgsize;