| 24 | namespace { |
| 25 | |
| 26 | uint32_t GetArrayLength(ValidationState_t& _, const Instruction* array_type) { |
| 27 | assert(array_type->opcode() == spv::Op::OpTypeArray); |
| 28 | uint32_t const_int_id = array_type->GetOperandAs<uint32_t>(2U); |
| 29 | Instruction* array_length_inst = _.FindDef(const_int_id); |
| 30 | uint32_t array_length = 0; |
| 31 | if (array_length_inst->opcode() == spv::Op::OpConstant) { |
| 32 | array_length = array_length_inst->GetOperandAs<uint32_t>(2); |
| 33 | } |
| 34 | return array_length; |
| 35 | } |
| 36 | |
| 37 | spv_result_t ValidateRayQueryPointer(ValidationState_t& _, |
| 38 | const Instruction* inst, |
no test coverage detected