Validate the number of global and local variables.
authorEhsan Nasiri <ehsann@google.com>
Tue, 29 Nov 2016 20:50:34 +0000 (15:50 -0500)
committerDavid Neto <dneto@google.com>
Thu, 1 Dec 2016 21:04:13 +0000 (16:04 -0500)
commit4b26d514efa4eaf5e1069c5ca974d558d0391334
treec2d43e65196c89c1734d30fdd2bf031a20bde29d
parent490617133e2153bfcb646fee8ec04e8d2dfabfd8
Validate the number of global and local variables.

According to the Universal Limits section of the SPIR-V Spec (2.17), the
number of global variables may not exceed 65,535 and the number of local
variables may not exceed 524,287.

Also added unit tests for each one.
source/val/validation_state.cpp
source/val/validation_state.h
source/validate_instruction.cpp
test/val/val_limits_test.cpp