From 6ba61ea391723a3d1d44df9a26abdeeb746be713 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sun, 12 Aug 2018 19:17:27 +0100 Subject: [PATCH] intel/aub_viewer: fold binding/sampler table items MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Makes things easier to read rather than a long block of text. Signed-off-by: Lionel Landwerlin Reviewed-by: Tapani Pälli --- src/intel/tools/aubinator_viewer_decoder.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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; } -- 2.30.2