freedreno/decode: print estimated crash location without colored output
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Tue, 10 Aug 2021 09:24:04 +0000 (12:24 +0300)
committerMarge Bot <eric+marge@anholt.net>
Wed, 11 Aug 2021 09:24:19 +0000 (09:24 +0000)
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12302>

src/freedreno/.gitlab-ci/reference/crash.log
src/freedreno/decode/cffdec.c

index ceba6c8..b333272 100644 (file)
@@ -1728,6 +1728,7 @@ got cmdszdw=27
 0000000100000014:                      0000: 70108000
 bad type! deadd00d
                        opcode: CP_NOP (10) (1 dwords)
+ESTIMATED CRASH LOCATION!
 0000000100000020:                      0000: 70108000
                        opcode: CP_NOP (10) (1 dwords)
 0000000100000024:                      0000: 70108000
index ef7d436..bdae7c9 100644 (file)
@@ -168,9 +168,6 @@ static void dump_tex_const(uint32_t *texsamp, int num_unit, int level);
 static bool
 highlight_gpuaddr(uint64_t gpuaddr)
 {
-   if (!options->color)
-      return false;
-
    if (!options->ibs[ib].base)
       return false;
 
@@ -178,7 +175,7 @@ highlight_gpuaddr(uint64_t gpuaddr)
       return false;
 
    if (ibs[ib].triggered)
-      return true;
+      return options->color;
 
    if (options->ibs[ib].base != ibs[ib].base)
       return false;
@@ -193,7 +190,7 @@ highlight_gpuaddr(uint64_t gpuaddr)
    if (triggered)
       printf("ESTIMATED CRASH LOCATION!\n");
 
-   return triggered;
+   return triggered & options->color;
 }
 
 static void