Lines Matching refs:group

64         struct v3d_group *group;  member
74 v3d_group_get_name(struct v3d_group *group) in v3d_group_get_name() argument
76 return group->name; in v3d_group_get_name()
80 v3d_group_get_opcode(struct v3d_group *group) in v3d_group_get_opcode() argument
82 return group->opcode; in v3d_group_get_opcode()
204 struct v3d_group *group; in create_group() local
206 group = xzalloc(sizeof(*group)); in create_group()
208 group->name = xstrdup(name); in create_group()
210 group->spec = ctx->spec; in create_group()
211 group->group_offset = 0; in create_group()
212 group->group_count = 0; in create_group()
213 group->variable = false; in create_group()
216 group->parent = parent; in create_group()
218 &group->group_offset, in create_group()
219 &group->group_count, in create_group()
220 &group->group_size, in create_group()
221 &group->variable); in create_group()
224 return group; in create_group()
390 if (ctx->group->nfields == ctx->group->fields_size) { in create_and_append_field()
391 ctx->group->fields_size = MAX2(ctx->group->fields_size * 2, 2); in create_and_append_field()
392 ctx->group->fields = in create_and_append_field()
393 (struct v3d_field **) realloc(ctx->group->fields, in create_and_append_field()
394 sizeof(ctx->group->fields[0]) * in create_and_append_field()
395 ctx->group->fields_size); in create_and_append_field()
398 ctx->group->fields[ctx->group->nfields++] = create_field(ctx, atts); in create_and_append_field()
402 set_group_opcode(struct v3d_group *group, const char **atts) in set_group_opcode() argument
409 group->opcode = strtoul(atts[i + 1], &p, 0); in set_group_opcode()
445 ctx->group = create_group(ctx, name, atts, NULL); in start_element()
448 set_group_opcode(ctx->group, atts); in start_element()
450 ctx->group = create_group(ctx, name, atts, NULL); in start_element()
451 get_register_offset(atts, &ctx->group->register_offset); in start_element()
453 struct v3d_group *previous_group = ctx->group; in start_element()
457 struct v3d_group *group = create_group(ctx, "", atts, in start_element() local
458 ctx->group); in start_element()
459 previous_group->next = group; in start_element()
460 ctx->group = group; in start_element()
481 struct v3d_group *group = ctx->group; in end_element() local
483 ctx->group = ctx->group->parent; in end_element()
486 spec->commands[spec->ncommands++] = group; in end_element()
492 for (int i = 0; i < group->nfields; i++) { in end_element()
493 group->fields[i]->start += 8; in end_element()
494 group->fields[i]->end += 8; in end_element()
498 spec->structs[spec->nstructs++] = group; in end_element()
500 spec->registers[spec->nregisters++] = group; in end_element()
506 ctx->group = ctx->group->parent; in end_element()
508 assert(ctx->group->nfields > 0); in end_element()
509 struct v3d_field *field = ctx->group->fields[ctx->group->nfields - 1]; in end_element()
646 struct v3d_group *group = spec->commands[i]; in v3d_spec_find_instruction() local
648 if (opcode != group->opcode) in v3d_spec_find_instruction()
655 for (int j = 0; j < group->nfields; j++) { in v3d_spec_find_instruction()
656 struct v3d_field *field = group->fields[j]; in v3d_spec_find_instruction()
668 return group; in v3d_spec_find_instruction()
676 v3d_group_get_length(struct v3d_group *group) in v3d_group_get_length() argument
679 for (int i = 0; i < group->nfields; i++) { in v3d_group_get_length()
680 struct v3d_field *field = group->fields[i]; in v3d_group_get_length()
689 struct v3d_group *group, in v3d_field_iterator_init() argument
695 iter->group = group; in v3d_field_iterator_init()
714 return iter->field_iter < iter->group->nfields; in iter_more_fields()
721 return iter->group->group_offset + (group_iter * in iter_group_offset_bits()
722 iter->group->group_size); in iter_group_offset_bits()
728 if (iter->group->variable) { in iter_more_groups()
730 (v3d_group_get_length(iter->group) * 8); in iter_more_groups()
732 return (iter->group_iter + 1) < iter->group->group_count || in iter_more_groups()
733 iter->group->next != NULL; in iter_more_groups()
740 if (iter->group->variable) in iter_advance_group()
743 if ((iter->group_iter + 1) < iter->group->group_count) { in iter_advance_group()
746 iter->group = iter->group->next; in iter_advance_group()
764 iter->field = iter->group->fields[iter->field_iter++]; in iter_advance_field()
824 v3d_spec_find_struct(iter->group->spec, in v3d_field_iterator_next()
847 if (strlen(iter->group->name) == 0) { in v3d_field_iterator_next()
863 v3d_print_group(FILE *outfile, struct v3d_group *group, in v3d_print_group() argument
868 v3d_field_iterator_init(&iter, group, p, color); in v3d_print_group()