[Mesa-dev] [PATCH 01/11] intel/decoder: Expose the raw field value in the iterator

Jason Ekstrand jason at jlekstrand.net
Wed Dec 13 20:05:38 UTC 2017


---
 src/intel/common/gen_decoder.c | 3 ++-
 src/intel/common/gen_decoder.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c
index 333b5ab..1f6b984 100644
--- a/src/intel/common/gen_decoder.c
+++ b/src/intel/common/gen_decoder.c
@@ -889,10 +889,11 @@ iter_decode_field(struct gen_field_iterator *iter)
 
    memset(&v, 0, sizeof(v));
 
-   v.qw = iter_decode_field_raw(iter);
+   iter->raw_value = iter_decode_field_raw(iter);
 
    const char *enum_name = NULL;
 
+   v.qw = iter->raw_value;
    switch (iter->field->type.kind) {
    case GEN_TYPE_UNKNOWN:
    case GEN_TYPE_INT: {
diff --git a/src/intel/common/gen_decoder.h b/src/intel/common/gen_decoder.h
index 7516042..7b141ec 100644
--- a/src/intel/common/gen_decoder.h
+++ b/src/intel/common/gen_decoder.h
@@ -67,6 +67,7 @@ struct gen_field_iterator {
    struct gen_group *group;
    char name[128];
    char value[128];
+   uint64_t raw_value;
    struct gen_group *struct_desc;
    const uint32_t *p;
    int p_bit; /**< bit offset into p */
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list