When decoding a structure field within a group, we may want to look up
that structure type.  Having a gen_spec pointer makes it easy to do so.
---
 src/intel/tools/decoder.c | 1 +
 src/intel/tools/decoder.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/intel/tools/decoder.c b/src/intel/tools/decoder.c
index ac1c74d7d5d..e94c7387128 100644
--- a/src/intel/tools/decoder.c
+++ b/src/intel/tools/decoder.c
@@ -180,6 +180,7 @@ create_group(struct parser_context *ctx, const char *name, 
const char **atts)
    if (name)
       group->name = xstrdup(name);
 
+   group->spec = ctx->spec;
    group->group_offset = 0;
    group->group_count = 0;
 
diff --git a/src/intel/tools/decoder.h b/src/intel/tools/decoder.h
index b17be1d5fbf..7b14ef4a647 100644
--- a/src/intel/tools/decoder.h
+++ b/src/intel/tools/decoder.h
@@ -60,6 +60,7 @@ struct gen_field_iterator {
 };
 
 struct gen_group {
+   struct gen_spec *spec;
    char *name;
    int nfields;
    struct gen_field **fields;
-- 
2.12.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to