Checks that result IDs are within the ID bound specified in the SPIR-V header
authorEhsan Nasiri <ehsann@google.com>
Thu, 24 Nov 2016 20:37:22 +0000 (15:37 -0500)
committerDavid Neto <dneto@google.com>
Mon, 28 Nov 2016 16:44:10 +0000 (11:44 -0500)
commitbd5b0bfca1bf067563c9e03a7c30c3590189b5c0
tree999983b1cfece234b7ed8c504bcbf086605183cf
parentf72189c249ba143c6a89a4cf1e7d53337b2ddd40
Checks that result IDs are within the ID bound specified in the SPIR-V header

This is described in Section 2.17 of the SPIR-V Spec.

* Updated existing unit test 'SemanticsIdIsAnIdNotALiteral' to pass by
manipulating the ID bound in its binary header.

* Fixed boundary check in the code.

* Added unit test to check the case that the largest ID is equal to the
ID bound.
source/val/validation_state.cpp
source/val/validation_state.h
source/validate.cpp
source/validate_instruction.cpp
test/val/CMakeLists.txt
test/val/val_capability_test.cpp
test/val/val_fixtures.cpp
test/val/val_fixtures.h
test/val/val_limits_test.cpp [new file with mode: 0644]