pan/decode: Disable magic divisor debugging
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 22 Jul 2019 15:34:26 +0000 (08:34 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 22 Jul 2019 15:34:26 +0000 (08:34 -0700)
Memory corruption (for both legitimate and illegitimate reasons) causes
this to hang pantrace.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/pandecode/decode.c

index 36ea4ca8d97365759e218a99c8d5d24c0c430a9a..fb48087cddb9d32978c034bd97d4ba08fe760bc7 100644 (file)
@@ -937,6 +937,7 @@ pandecode_padded_vertices(unsigned shift, unsigned k)
 static void
 pandecode_magic_divisor(uint32_t magic, unsigned shift, unsigned orig_divisor, unsigned extra)
 {
+#if 0
         /* Compute the modular inverse of `magic` with respect to 2^(32 -
          * shift) the most lame way possible... just repeatedly add.
          * Asymptoptically slow but nobody cares in practice, unless you have
@@ -972,6 +973,7 @@ pandecode_magic_divisor(uint32_t magic, unsigned shift, unsigned orig_divisor, u
         unsigned padded_num_vertices = inverse / orig_divisor;
 
         pandecode_msg("padded_num_vertices = %d\n", padded_num_vertices);
+#endif
 }
 
 static void