diff options
author | Andrey Tuganov <andreyt@google.com> | 2017-02-23 16:07:52 -0500 |
---|---|---|
committer | David Neto <dneto@google.com> | 2017-02-28 22:27:08 -0500 |
commit | 0e9c24fdd112e7742b9b5dcff35aee32e71a66fd (patch) | |
tree | cc83eb4584800fd0bd14ce88da2bdf62416fc160 /source/validate.h | |
parent | 4ef3b3e0b98d36083cb330c6b386feb51421b811 (diff) | |
download | spirv-tools-0e9c24fdd112e7742b9b5dcff35aee32e71a66fd.tar.gz |
Issue 559: check type declaration uniqueness
Adds PassTypeUnique to the validator.
Disallows repeated declarations of all types except for aggregates.
Diffstat (limited to 'source/validate.h')
-rw-r--r-- | source/validate.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/validate.h b/source/validate.h index a1c3e548..6d1ecacf 100644 --- a/source/validate.h +++ b/source/validate.h @@ -154,6 +154,11 @@ spv_result_t InstructionPass(ValidationState_t& _, /// Performs decoration validation. spv_result_t ValidateDecorations(ValidationState_t& _); +/// Validates that type declarations are unique, unless multiple declarations +/// of the same data type are allowed by the specification. +/// (see section 2.8 Types and Variables) +spv_result_t TypeUniquePass(ValidationState_t& _, + const spv_parsed_instruction_t* inst); } // namespace libspirv /// @brief Validate the ID usage of the instruction stream |