From: Lionel Landwerlin Date: Sun, 18 Nov 2018 17:25:46 +0000 (+0000) Subject: intel/aub_viewer: highlight true booleans X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f7bccf6ab4d3793a4d15a8594224767080a5b886;p=mesa.git intel/aub_viewer: highlight true booleans Useful to spot PIPE_CONTROL flags. Signed-off-by: Lionel Landwerlin Reviewed-by: Tapani Pälli --- 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;