Skip to content

Commit

Permalink
Missed updating other assert
Browse files Browse the repository at this point in the history
  • Loading branch information
alelenv committed Jan 31, 2025
1 parent fb34fc2 commit 802edc1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/val/validate_ray_tracing_reorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ uint32_t GetArrayLength(ValidationState_t& _, const Instruction* array_type) {
assert(array_type->opcode() == spv::Op::OpTypeArray);
uint32_t const_int_id = array_type->GetOperandAs<uint32_t>(2U);
Instruction* array_length_inst = _.FindDef(const_int_id);
assert(array_length_inst->opcode() == spv::Op::OpConstant);
uint32_t array_length = array_length_inst->GetOperandAs<uint32_t>(2);
uint32_t array_length = 0;
if (array_length_inst->opcode() == spv::Op::OpConstant) {
array_length = array_length_inst->GetOperandAs<uint32_t>(2);
}
return array_length;
}

Expand Down

0 comments on commit 802edc1

Please sign in to comment.