Validator support for Variable Pointer extension.
authorEhsan Nasiri <ehsann@google.com>
Wed, 1 Feb 2017 20:37:39 +0000 (15:37 -0500)
committerDavid Neto <dneto@google.com>
Fri, 7 Apr 2017 13:49:48 +0000 (09:49 -0400)
commit23af06c3a308a4e388412809788add9a8510fe80
treeca004030c530fe8226d7e4b70ebb10e5bb549bce
parent4895ace29b8b091fa9a19364afd3e1c0f096aa3c
Validator support for Variable Pointer extension.

If the variable_pointer extension is used:

* OpLoad's pointer argument may be the result of any of the following:
 * OpSelect
 * OpPhi
 * OpFunctionCall
 * OpPtrAccessChain
 * OpCopyObject
 * OpLoad
 * OpConstantNull

* Return value of a function may be a pointer.

* It is valid to use a pointer as the return value of a function.

* OpStore should allow a variable pointer argument.
source/opcode.cpp
source/opcode.h
source/val/validation_state.cpp
source/val/validation_state.h
source/validate_id.cpp
source/validate_instruction.cpp
test/val/val_id_test.cpp