pan/bi: Print bad instruction on src packing fail
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 1 May 2020 18:54:20 +0000 (14:54 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 4 May 2020 15:08:14 +0000 (11:08 -0400)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883>

src/panfrost/bifrost/bi_pack.c

index f6bdc1ebc87337dddc12caa33edefa774956face..60e3ddeab674995c3ff35afcca048c3c51fc98eb 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "compiler.h"
+#include "bi_print.h"
 
 #define RETURN_PACKED(str) { \
         uint64_t temp = 0; \
@@ -468,8 +469,10 @@ bi_get_src(bi_instruction *ins, struct bi_registers *regs, unsigned s, bool is_f
                 return BIFROST_SRC_STAGE;
         else if (src & BIR_INDEX_PASS)
                 return src & ~BIR_INDEX_PASS;
-        else
-                unreachable("Unknown src");
+        else {
+                bi_print_instruction(ins, stderr);
+                unreachable("Unknown src in above instruction");
+        }
 }
 
 /* Constructs a packed 2-bit swizzle for a 16-bit vec2 source. Source must be