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
Auto-Submit: Ben Clayton <>
Commit-Queue: David Neto <>
Kokoro: Kokoro <>
Reviewed-by: David Neto <>
diff --git a/src/reader/spirv/ b/src/reader/spirv/
index bec3e4a..588cba3 100644
--- a/src/reader/spirv/
+++ b/src/reader/spirv/
@@ -902,10 +902,10 @@
     // Save the lists, in ID-sorted order.
-    std::vector<uint32_t> sorted_inputs(inputs.begin(), inputs.end());
+    std::vector<uint32_t> sorted_inputs(inputs);
     std::sort(sorted_inputs.begin(), sorted_inputs.end());
-    std::vector<uint32_t> sorted_outputs(outputs.begin(), outputs.end());
-    std::sort(sorted_inputs.begin(), sorted_inputs.end());
+    std::vector<uint32_t> sorted_outputs(outputs);
+    std::sort(sorted_outputs.begin(), sorted_outputs.end());
     const auto ast_stage = enum_converter_.ToPipelineStage(stage);
     GridSize wgsize;