From: Lionel Landwerlin Date: Mon, 25 Sep 2017 23:54:49 +0000 (+0100) Subject: intel: decoder: extract instruction/structs length X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38f338c19a7803a218a9b3249c4d6b2600edd75a;p=mesa.git intel: decoder: extract instruction/structs length Signed-off-by: Lionel Landwerlin Reviewed-by: Scott D Phillips --- diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index 97e54cd44ac..24c9fa79ad0 100644 --- a/src/intel/common/gen_decoder.c +++ b/src/intel/common/gen_decoder.c @@ -162,6 +162,13 @@ create_group(struct parser_context *ctx, group->spec = ctx->spec; group->variable = false; + for (int i = 0; atts[i]; i += 2) { + char *p; + if (strcmp(atts[i], "length") == 0) { + group->dw_length = strtoul(atts[i + 1], &p, 0); + } + } + if (parent) { group->parent = parent; get_group_offset_count(atts, diff --git a/src/intel/common/gen_decoder.h b/src/intel/common/gen_decoder.h index 12d0c063ee9..5d5ce7825f4 100644 --- a/src/intel/common/gen_decoder.h +++ b/src/intel/common/gen_decoder.h @@ -87,6 +87,7 @@ struct gen_group { struct gen_field *fields; /* linked list of fields */ + uint32_t dw_length; uint32_t group_offset, group_count; uint32_t group_size; bool variable;