diff options
author | Andrey Tuganov <andreyt@google.com> | 2018-04-03 16:07:55 -0400 |
---|---|---|
committer | David Neto <dneto@google.com> | 2018-04-05 13:45:45 -0400 |
commit | 691eed92cb6300efd2fdd71e4ec156b73e89886b (patch) | |
tree | c012c518e4aeb11876edb377e6bdcd2fe70a034e /source/val | |
parent | da332cf332c795d3b21b44e76d972c6d3b16a3d9 (diff) | |
download | spirv-tools-691eed92cb6300efd2fdd71e4ec156b73e89886b.tar.gz |
Fix major bug in validate_builtins
Fixed an early return in the loop, resulting in only one decoration
being checked.
Diffstat (limited to 'source/val')
-rw-r--r-- | source/val/validation_state.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/val/validation_state.h b/source/val/validation_state.h index 8f46c9b7..3e382c80 100644 --- a/source/val/validation_state.h +++ b/source/val/validation_state.h @@ -306,8 +306,7 @@ class ValidationState_t { } // Returns const pointer to the internal decoration container. - const std::unordered_map<uint32_t, std::vector<Decoration>>& id_decorations() - const { + const std::map<uint32_t, std::vector<Decoration>>& id_decorations() const { return id_decorations_; } @@ -528,7 +527,7 @@ class ValidationState_t { std::unordered_map<uint32_t, uint32_t> struct_nesting_depth_; /// Stores the list of decorations for a given <id> - std::unordered_map<uint32_t, std::vector<Decoration>> id_decorations_; + std::map<uint32_t, std::vector<Decoration>> id_decorations_; /// Stores type declarations which need to be unique (i.e. non-aggregates), /// in the form [opcode, operand words], result_id is not stored. |