vc4: Fix bus errors on dumping CL on hardware.
authorEric Anholt <eric@anholt.net>
Tue, 28 Jul 2015 06:15:39 +0000 (23:15 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 29 Jul 2015 02:35:22 +0000 (19:35 -0700)
The kernel can't fixup unaligned float traps for us, so deref as a
uint32_t first.

src/gallium/drivers/vc4/vc4_cl_dump.c

index 64de79cc830dc975cab9332d08db0b452d840e4e..e153a2430905513e4942165bdaa4dc6783248866 100644 (file)
@@ -34,7 +34,7 @@ dump_float(void *cl, uint32_t offset, uint32_t hw_offset)
         void *f = cl + offset;
 
         fprintf(stderr, "0x%08x 0x%08x:      %f (0x%08x)\n",
-                offset, hw_offset, *(float *)f, *(uint32_t *)f);
+                offset, hw_offset, uif(*(uint32_t *)f), *(uint32_t *)f);
 }
 
 static void