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