From 802edc17566b42fcbab3566faeef1e26cfdb88fb Mon Sep 17 00:00:00 2001 From: alelenv Date: Fri, 31 Jan 2025 09:37:06 -0800 Subject: [PATCH] Missed updating other assert --- source/val/validate_ray_tracing_reorder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/val/validate_ray_tracing_reorder.cpp b/source/val/validate_ray_tracing_reorder.cpp index d7262a97e2..41b6fb08c0 100644 --- a/source/val/validate_ray_tracing_reorder.cpp +++ b/source/val/validate_ray_tracing_reorder.cpp @@ -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(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(2); + uint32_t array_length = 0; + if (array_length_inst->opcode() == spv::Op::OpConstant) { + array_length = array_length_inst->GetOperandAs(2); + } return array_length; }