validate_dest(&instr->dest, state);
+ exec_list_validate(&instr->srcs);
assert(exec_list_length(&instr->srcs) ==
state->block->predecessors->entries);
}
{
state->instr = &instr->instr;
+ exec_list_validate(&instr->srcs);
foreach_list_typed(nir_phi_src, src, node, &instr->srcs) {
if (src->pred == pred) {
validate_src(&src->src, state);
state->block = block;
+ exec_list_validate(&block->instr_list);
nir_foreach_instr(block, instr) {
if (instr->type == nir_instr_type_phi) {
assert(instr == nir_block_first_instr(block) ||
nir_cf_node *old_parent = state->parent_node;
state->parent_node = &if_stmt->cf_node;
+ exec_list_validate(&if_stmt->then_list);
foreach_list_typed(nir_cf_node, cf_node, node, &if_stmt->then_list) {
validate_cf_node(cf_node, state);
}
+ exec_list_validate(&if_stmt->else_list);
foreach_list_typed(nir_cf_node, cf_node, node, &if_stmt->else_list) {
validate_cf_node(cf_node, state);
}
nir_cf_node *old_parent = state->parent_node;
state->parent_node = &loop->cf_node;
+ exec_list_validate(&loop->body);
foreach_list_typed(nir_cf_node, cf_node, node, &loop->body) {
validate_cf_node(cf_node, state);
}
state->impl = impl;
state->parent_node = &impl->cf_node;
+ exec_list_validate(&impl->locals);
foreach_list_typed(nir_variable, var, node, &impl->locals) {
validate_var_decl(var, false, state);
}
+ exec_list_validate(&impl->registers);
foreach_list_typed(nir_register, reg, node, &impl->registers) {
prevalidate_reg_decl(reg, false, state);
}
+ exec_list_validate(&impl->body);
foreach_list_typed(nir_cf_node, node, node, &impl->body) {
validate_cf_node(node, state);
}
static void
validate_function(nir_function *func, validate_state *state)
{
+ exec_list_validate(&func->overload_list);
foreach_list_typed(nir_function_overload, overload, node, &func->overload_list) {
assert(overload->function == func);
validate_function_overload(overload, state);
validate_var_decl((nir_variable *) entry->data, true, &state);
}
+ exec_list_validate(&shader->globals);
foreach_list_typed(nir_variable, var, node, &shader->globals) {
validate_var_decl(var, true, &state);
}
+ exec_list_validate(&shader->system_values);
foreach_list_typed(nir_variable, var, node, &shader->system_values) {
validate_var_decl(var, true, &state);
}
+ exec_list_validate(&shader->registers);
foreach_list_typed(nir_register, reg, node, &shader->registers) {
prevalidate_reg_decl(reg, true, &state);
}
+ exec_list_validate(&shader->functions);
foreach_list_typed(nir_function, func, node, &shader->functions) {
validate_function(func, &state);
}