pan/mdg: Print 8-bit constants
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 14 May 2020 17:30:41 +0000 (13:30 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 1 Jun 2020 15:46:23 +0000 (15:46 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>

src/panfrost/midgard/midgard_print.c

index a5133f09e20c003a789d7d608be59544226c4273..7a41dcab5ca879accf560d6c3aeed36d9bc4ab65 100644 (file)
@@ -221,7 +221,13 @@ mir_print_constant_component(FILE *fp, const midgard_constants *consts, unsigned
                 break;
 
         case midgard_reg_mode_8:
-                unreachable("XXX TODO: sort out how 8-bit constant encoding works");
+                fprintf(fp, "0x%X", consts->u8[c]);
+
+                if (mod)
+                        fprintf(fp, " /* %u */", mod);
+
+                assert(!half); /* No 4-bit */
+
                 break;
         }
 }