Mesa (master): intel/aub_viewer: highlight true booleans
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Dec 28 16:50:18 UTC 2018
Module: Mesa
Branch: master
Commit: f7bccf6ab4d3793a4d15a8594224767080a5b886
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7bccf6ab4d3793a4d15a8594224767080a5b886
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Sun Nov 18 17:25:46 2018 +0000
intel/aub_viewer: highlight true booleans
Useful to spot PIPE_CONTROL flags.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
---
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 fe93615438..ef3426b865 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 7819e59346..f8c2b776fe 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 7cc82e50a5..e60965017c 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;
More information about the mesa-commit
mailing list