From f7bccf6ab4d3793a4d15a8594224767080a5b886 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sun, 18 Nov 2018 17:25:46 +0000 Subject: [PATCH] intel/aub_viewer: highlight true booleans MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Useful to spot PIPE_CONTROL flags. Signed-off-by: Lionel Landwerlin Reviewed-by: Tapani Pälli --- src/intel/tools/aubinator_viewer.cpp | 1 + src/intel/tools/aubinator_viewer.h | 4 +++- src/intel/tools/aubinator_viewer_decoder.cpp | 7 ++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/intel/tools/aubinator_viewer.cpp b/src/intel/tools/aubinator_viewer.cpp index fe936154381..ef3426b8656 100644 --- a/src/intel/tools/aubinator_viewer.cpp +++ b/src/intel/tools/aubinator_viewer.cpp @@ -993,6 +993,7 @@ display_aubfile_window(struct window *win) ImGui::ColorEdit3("error", (float *)&cfg->error_color, cflags); ImGui::SameLine(); ImGui::ColorEdit3("highlight", (float *)&cfg->highlight_color, cflags); ImGui::SameLine(); ImGui::ColorEdit3("dwords", (float *)&cfg->dwords_color, cflags); ImGui::SameLine(); + ImGui::ColorEdit3("booleans", (float *)&cfg->boolean_color, cflags); ImGui::SameLine(); if (ImGui::Button("Commands list") || has_ctrl_key('c')) { show_commands_window(); } ImGui::SameLine(); if (ImGui::Button("Registers list") || has_ctrl_key('r')) { show_register_window(); } ImGui::SameLine(); diff --git a/src/intel/tools/aubinator_viewer.h b/src/intel/tools/aubinator_viewer.h index 7819e593462..f8c2b776fe0 100644 --- a/src/intel/tools/aubinator_viewer.h +++ b/src/intel/tools/aubinator_viewer.h @@ -12,13 +12,15 @@ struct aub_viewer_cfg { ImColor highlight_color; ImColor error_color; ImColor missing_color; + ImColor boolean_color; aub_viewer_cfg() : clear_color(114, 144, 154), dwords_color(29, 177, 194, 255), highlight_color(0, 230, 0, 255), error_color(236, 255, 0, 255), - missing_color(230, 0, 230, 255) {} + missing_color(230, 0, 230, 255), + boolean_color(228, 75, 255) {} }; struct aub_viewer_decode_cfg { diff --git a/src/intel/tools/aubinator_viewer_decoder.cpp b/src/intel/tools/aubinator_viewer_decoder.cpp index 7cc82e50a5d..e60965017c5 100644 --- a/src/intel/tools/aubinator_viewer_decoder.cpp +++ b/src/intel/tools/aubinator_viewer_decoder.cpp @@ -74,7 +74,12 @@ aub_viewer_print_group(struct aub_viewer_decode_ctx *ctx, } if (!gen_field_is_header(iter.field)) { if (ctx->decode_cfg->field_filter.PassFilter(iter.name)) { - ImGui::Text("%s: %s", iter.name, iter.value); + if (iter.field->type.kind == gen_type::GEN_TYPE_BOOL && iter.raw_value) { + ImGui::Text("%s: ", iter.name); ImGui::SameLine(); + ImGui::TextColored(ctx->cfg->boolean_color, "true"); + } else { + ImGui::Text("%s: %s", iter.name, iter.value); + } if (iter.struct_desc) { int struct_dword = iter.start_bit / 32; uint64_t struct_address = address + 4 * struct_dword; -- 2.30.2