summaryrefslogtreecommitdiffstats
path: root/src/intel/tools
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2016-10-17 09:11:04 -0700
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2016-10-17 18:16:38 +0100
commit6b17e3a6da82df47056e1c6f8a79af2fab629b2c (patch)
tree5fa7900e241c9e8714e558d495ba2a96fa4f606e /src/intel/tools
parentc3ce0d22b4cf95992cf402a70beca3f2877bcf98 (diff)
downloadexternal_mesa3d-6b17e3a6da82df47056e1c6f8a79af2fab629b2c.zip
external_mesa3d-6b17e3a6da82df47056e1c6f8a79af2fab629b2c.tar.gz
external_mesa3d-6b17e3a6da82df47056e1c6f8a79af2fab629b2c.tar.bz2
intel: aubinator: use different colors to signal batch start/end
This makes the stream of commands a bit easier to read. v2 (Ken): Use bold text on green headers for easier readability; swap the green and blue headers so the majority stay blue. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Diffstat (limited to 'src/intel/tools')
-rw-r--r--src/intel/tools/aubinator.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c
index d716a65..31c1f89 100644
--- a/src/intel/tools/aubinator.c
+++ b/src/intel/tools/aubinator.c
@@ -50,8 +50,9 @@
#define AUB_MI_BATCH_BUFFER_END (0x0500 << 16)
#define CSI "\e["
-#define HEADER CSI "37;44m"
-#define NORMAL CSI "0m"
+#define BLUE_HEADER CSI "0;44m"
+#define GREEN_HEADER CSI "1;42m"
+#define NORMAL CSI "0m"
/* options */
@@ -727,9 +728,13 @@ parse_commands(struct gen_spec *spec, uint32_t *cmds, int size, int engine)
const char *color, *reset_color = NORMAL;
uint64_t offset;
- if (option_full_decode)
- color = HEADER;
- else
+ if (option_full_decode) {
+ if ((p[0] & 0xffff0000) == AUB_MI_BATCH_BUFFER_START ||
+ (p[0] & 0xffff0000) == AUB_MI_BATCH_BUFFER_END)
+ color = GREEN_HEADER;
+ else
+ color = BLUE_HEADER;
+ } else
color = NORMAL;
if (option_color == COLOR_NEVER) {