diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index affbae3e..8dd6df0f 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -7060,6 +7060,7 @@ enum vkd3d_result vsir_program_validate(struct vsir_program *program, uint64_t c .null_location = {.source_name = source_name}, .status = VKD3D_OK, .phase = VKD3DSIH_INVALID, + .invalid_instruction_idx = true, }; unsigned int i; @@ -7088,6 +7089,8 @@ enum vkd3d_result vsir_program_validate(struct vsir_program *program, uint64_t c if (!(ctx.ssas = vkd3d_calloc(ctx.program->ssa_count, sizeof(*ctx.ssas)))) goto fail; + ctx.invalid_instruction_idx = false; + for (ctx.instruction_idx = 0; ctx.instruction_idx < program->instructions.count && ctx.status != VKD3D_ERROR_OUT_OF_MEMORY; ++ctx.instruction_idx) vsir_validate_instruction(&ctx);