bitcast fixes
authorFlorian Ziesche <florian.ziesche@gmail.com>
Wed, 2 Mar 2016 21:17:54 +0000 (22:17 +0100)
committerDejan Mircevski <deki@google.com>
Fri, 29 Apr 2016 18:55:05 +0000 (14:55 -0400)
commit66fcb456c1cb3c793c4095b6d7b5ee78a12dc4b4
tree919e2c721905d8ea1555671cb52f01b2c35a0039
parent13877a3b0e9d9e3217f726178f6d26f1bf1867cc
bitcast fixes

 * ValidationState_t and idUsage now store the addressing model and memory model of the SPIR-V module (this is necessary for certain instructions that need different checks depending on if the logical or physical addressing model is used)
 * removed SpvOpPtrAccessChain and SpvOpInBoundsPtrAccessChain from spvOpcodeIsPointer again as these are disallowed in logical addressing mode and only allowed in physical addressing mode (which doesn't use/need spvOpcodeIsPointer in the first place)
 * added SpvOpImageTexelPointer and SpvOpCopyObject to spvOpcodeIsPointer
 * OpLoad/OpStore now only check if the used pointer operand originated from a valid pointer producing opcode in logical addressing mode (as per 2.16.1)
 * moved bitcast pointer tests to the kernel / physical addressing model part (+cleanup)
 * renamed spvOpcodeIsPointer to spvOpcodeReturnsLogicalPointer to clarify this function is only meant to be used with the logical addressing model
source/opcode.cpp
source/opcode.h
source/validate.h
source/validate_id.cpp
source/validate_instruction.cpp
source/validate_types.cpp
test/ValidateID.cpp