From: Lionel Landwerlin Date: Sun, 12 Aug 2018 18:17:27 +0000 (+0100) Subject: intel/aub_viewer: fold binding/sampler table items X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ba61ea391723a3d1d44df9a26abdeeb746be713;p=mesa.git intel/aub_viewer: fold binding/sampler table items Makes things easier to read rather than a long block of text. Signed-off-by: Lionel Landwerlin Reviewed-by: Tapani Pälli --- diff --git a/src/intel/tools/aubinator_viewer_decoder.cpp b/src/intel/tools/aubinator_viewer_decoder.cpp index 105931560c6..7cc82e50a5d 100644 --- a/src/intel/tools/aubinator_viewer_decoder.cpp +++ b/src/intel/tools/aubinator_viewer_decoder.cpp @@ -233,8 +233,12 @@ dump_binding_table(struct aub_viewer_decode_ctx *ctx, uint32_t offset, int count continue; } - ImGui::Text("pointer %u: %08x", i, pointers[i]); - aub_viewer_print_group(ctx, strct, addr, (const uint8_t *) bo.map + (addr - bo.addr)); + const uint8_t *state = (const uint8_t *) bo.map + (addr - bo.addr); + if (ImGui::TreeNodeEx(&pointers[i], ImGuiTreeNodeFlags_Framed, + "pointer %u: %08x", i, pointers[i])) { + aub_viewer_print_group(ctx, strct, addr, state); + ImGui::TreePop(); + } } } @@ -262,8 +266,11 @@ dump_samplers(struct aub_viewer_decode_ctx *ctx, uint32_t offset, int count) } for (int i = 0; i < count; i++) { - ImGui::Text("sampler state %d", i); - aub_viewer_print_group(ctx, strct, state_addr, state_map); + if (ImGui::TreeNodeEx(state_map, ImGuiTreeNodeFlags_Framed, + "sampler state %d", i)) { + aub_viewer_print_group(ctx, strct, state_addr, state_map); + ImGui::TreePop(); + } state_addr += 16; state_map += 16; }