diff options
author | Jason Ekstrand <[email protected]> | 2017-12-12 17:36:47 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-12-14 13:27:04 -0800 |
commit | a7ae72032f550d9680673b67b1e81452d0b74fed (patch) | |
tree | 290cffff477670f5d56b92461e7d2488723e5e8f /src/intel/tools | |
parent | dca8f466ee3c1d2d3a8f120895639c9a2cca9272 (diff) |
intel/decoder: Take a bit offset in gen_print_group
Previously, if a group was nested in another group such that it didn't
start on a dword boundary, we would decode it as if it started at the
start of its first dword. This changes things to work even more in
terms of bits so that we can properly decode these structs. This
affects MOCS, attribute swizzles, and several other things.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/tools')
-rw-r--r-- | src/intel/tools/aubinator.c | 2 | ||||
-rw-r--r-- | src/intel/tools/aubinator_error_decode.c | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c index 48d4456cc16..45b9566ecec 100644 --- a/src/intel/tools/aubinator.c +++ b/src/intel/tools/aubinator.c @@ -100,7 +100,7 @@ decode_group(struct gen_group *strct, const uint32_t *p, int starting_dword) { uint64_t offset = option_print_offsets ? (void *) p - gtt : 0; - gen_print_group(outfile, strct, offset, p, option_color == COLOR_ALWAYS); + gen_print_group(outfile, strct, offset, p, 0, option_color == COLOR_ALWAYS); } static void diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c index 91e084574c9..ecc01b55e7f 100644 --- a/src/intel/tools/aubinator_error_decode.c +++ b/src/intel/tools/aubinator_error_decode.c @@ -68,8 +68,10 @@ print_register(struct gen_spec *spec, const char *name, uint32_t reg) { struct gen_group *reg_spec = gen_spec_find_register_by_name(spec, name); - if (reg_spec) - gen_print_group(stdout, reg_spec, 0, ®, option_color == COLOR_ALWAYS); + if (reg_spec) { + gen_print_group(stdout, reg_spec, 0, ®, 0, + option_color == COLOR_ALWAYS); + } } struct ring_register_mapping { @@ -277,7 +279,7 @@ decode(struct gen_spec *spec, struct gen_disasm *disasm, printf("%s0x%08"PRIx64": 0x%08x: %-80s%s\n", color, offset, p[0], gen_group_get_name(inst), reset_color); - gen_print_group(stdout, inst, offset, p, + gen_print_group(stdout, inst, offset, p, 0, option_color == COLOR_ALWAYS); if (strcmp(inst->name, "MI_BATCH_BUFFER_END") == 0) @@ -285,7 +287,7 @@ decode(struct gen_spec *spec, struct gen_disasm *disasm, if (strcmp(inst->name, "STATE_BASE_ADDRESS") == 0) { struct gen_field_iterator iter; - gen_field_iterator_init(&iter, inst, p, false); + gen_field_iterator_init(&iter, inst, p, 0, false); do { if (strcmp(iter.name, "Instruction Base Address") == 0) { @@ -298,7 +300,7 @@ decode(struct gen_spec *spec, struct gen_disasm *disasm, strcmp(inst->name, "3DSTATE_PS") == 0 || strcmp(inst->name, "3DSTATE_WM") == 0) { struct gen_field_iterator iter; - gen_field_iterator_init(&iter, inst, p, false); + gen_field_iterator_init(&iter, inst, p, 0, false); uint64_t ksp[3] = {0, 0, 0}; bool enabled[3] = {false, false, false}; @@ -356,7 +358,7 @@ decode(struct gen_spec *spec, struct gen_disasm *disasm, strcmp(inst->name, "3DSTATE_GS") == 0 || strcmp(inst->name, "3DSTATE_VS") == 0) { struct gen_field_iterator iter; - gen_field_iterator_init(&iter, inst, p, false); + gen_field_iterator_init(&iter, inst, p, 0, false); uint64_t ksp = 0; bool is_simd8 = false; /* vertex shaders on Gen8+ only */ bool is_enabled = true; @@ -390,7 +392,7 @@ decode(struct gen_spec *spec, struct gen_disasm *disasm, } } else if (strcmp(inst->name, "MEDIA_INTERFACE_DESCRIPTOR_LOAD") == 0) { struct gen_field_iterator iter; - gen_field_iterator_init(&iter, inst, p, false); + gen_field_iterator_init(&iter, inst, p, 0, false); uint64_t interface_offset = 0; do { if (strcmp(iter.name, "Interface Descriptor Data Start Address") == 0) { @@ -404,7 +406,7 @@ decode(struct gen_spec *spec, struct gen_disasm *disasm, gen_spec_find_struct(spec, "INTERFACE_DESCRIPTOR_DATA"); uint32_t *desc_p = ((void *)current_dynamic_state_buffer->data) + interface_offset; - gen_field_iterator_init(&iter, desc, desc_p, false); + gen_field_iterator_init(&iter, desc, desc_p, 0, false); do { if (strcmp(iter.name, "Kernel Start Pointer") == 0) { uint64_t ksp = strtol(iter.value, NULL, 16); |