[Mesa-dev] [PATCH 2/6] intel: aubinator: use different colors to signal batch start/end
Lionel Landwerlin
llandwerlin at gmail.com
Wed Oct 12 22:28:00 UTC 2016
This makes the stream of commands a bit easier to read.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
src/intel/tools/aubinator.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c
index d716a65..0313d5a 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 "37;44m"
+#define GREEN_HEADER CSI "0;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 = BLUE_HEADER;
+ else
+ color = GREEN_HEADER;
+ } else
color = NORMAL;
if (option_color == COLOR_NEVER) {
--
2.9.3
More information about the mesa-dev
mailing list