• Home
  • Raw
  • Download

Lines Matching refs:atts

194 get_group_offset_count(const char **atts, uint32_t *offset, uint32_t *count,  in get_group_offset_count()  argument
200 for (i = 0; atts[i]; i += 2) { in get_group_offset_count()
201 if (strcmp(atts[i], "count") == 0) { in get_group_offset_count()
202 *count = strtoul(atts[i + 1], &p, 0); in get_group_offset_count()
205 } else if (strcmp(atts[i], "start") == 0) { in get_group_offset_count()
206 *offset = strtoul(atts[i + 1], &p, 0); in get_group_offset_count()
207 } else if (strcmp(atts[i], "size") == 0) { in get_group_offset_count()
208 *size = strtoul(atts[i + 1], &p, 0); in get_group_offset_count()
217 const char **atts, in create_group() argument
233 get_group_offset_count(atts, in create_group()
244 create_enum(struct parser_context *ctx, const char *name, const char **atts) in create_enum() argument
258 get_register_offset(const char **atts, uint32_t *offset) in get_register_offset() argument
263 for (i = 0; atts[i]; i += 2) { in get_register_offset()
264 if (strcmp(atts[i], "num") == 0) in get_register_offset()
265 *offset = strtoul(atts[i + 1], &p, 0); in get_register_offset()
306 create_field(struct parser_context *ctx, const char **atts) in create_field() argument
315 for (i = 0; atts[i]; i += 2) { in create_field()
316 if (strcmp(atts[i], "name") == 0) in create_field()
317 field->name = xstrdup(atts[i + 1]); in create_field()
318 else if (strcmp(atts[i], "start") == 0) { in create_field()
319 field->start = strtoul(atts[i + 1], &p, 0); in create_field()
320 if (is_byte_offset(atts[i + 1])) in create_field()
322 } else if (strcmp(atts[i], "end") == 0) { in create_field()
323 field->end = strtoul(atts[i + 1], &p, 0) - 1; in create_field()
324 if (is_byte_offset(atts[i + 1])) in create_field()
326 } else if (strcmp(atts[i], "size") == 0) { in create_field()
327 size = strtoul(atts[i + 1], &p, 0); in create_field()
328 if (is_byte_offset(atts[i + 1])) in create_field()
330 } else if (strcmp(atts[i], "type") == 0) in create_field()
331 field->type = string_to_type(ctx, atts[i + 1]); in create_field()
332 else if (strcmp(atts[i], "default") == 0) { in create_field()
334 field->default_value = strtoul(atts[i + 1], &p, 0); in create_field()
335 } else if (strcmp(atts[i], "minus_one") == 0) { in create_field()
336 assert(strcmp(atts[i + 1], "true") == 0); in create_field()
348 create_value(struct parser_context *ctx, const char **atts) in create_value() argument
352 for (int i = 0; atts[i]; i += 2) { in create_value()
353 if (strcmp(atts[i], "name") == 0) in create_value()
354 value->name = xstrdup(atts[i + 1]); in create_value()
355 else if (strcmp(atts[i], "value") == 0) in create_value()
356 value->value = strtoul(atts[i + 1], NULL, 0); in create_value()
364 const char **atts) in create_and_append_field() argument
374 ctx->group->fields[ctx->group->nfields++] = create_field(ctx, atts); in create_and_append_field()
378 set_group_opcode(struct v3d_group *group, const char **atts) in set_group_opcode() argument
383 for (i = 0; atts[i]; i += 2) { in set_group_opcode()
384 if (strcmp(atts[i], "code") == 0) in set_group_opcode()
385 group->opcode = strtoul(atts[i + 1], &p, 0); in set_group_opcode()
410 start_element(void *data, const char *element_name, const char **atts) in start_element() argument
421 for (i = 0; atts[i]; i += 2) { in start_element()
422 if (strcmp(atts[i], "shortname") == 0) in start_element()
423 name = atts[i + 1]; in start_element()
424 else if (strcmp(atts[i], "name") == 0 && !name) in start_element()
425 name = atts[i + 1]; in start_element()
426 else if (strcmp(atts[i], "gen") == 0) in start_element()
427 ver = atts[i + 1]; in start_element()
428 else if (strcmp(atts[i], "min_ver") == 0) in start_element()
429 min_ver = strtoul(atts[i + 1], NULL, 0); in start_element()
430 else if (strcmp(atts[i], "max_ver") == 0) in start_element()
431 max_ver = strtoul(atts[i + 1], NULL, 0); in start_element()
455 ctx->group = create_group(ctx, name, atts, NULL); in start_element()
458 set_group_opcode(ctx->group, atts); in start_element()
460 ctx->group = create_group(ctx, name, atts, NULL); in start_element()
461 get_register_offset(atts, &ctx->group->register_offset); in start_element()
467 struct v3d_group *group = create_group(ctx, "", atts, in start_element()
472 create_and_append_field(ctx, atts); in start_element()
474 ctx->enoom = create_enum(ctx, name, atts); in start_element()
476 ctx->values[ctx->nvalues++] = create_value(ctx, atts); in start_element()