+static void
+pandecode_sfbd_format(struct mali_sfbd_format format)
+{
+ pandecode_log(".format = {\n");
+ pandecode_indent++;
+
+ pandecode_log(".unk1 = ");
+ pandecode_log_decoded_flags(sfbd_unk1_info, format.unk1);
+ pandecode_log_cont(",\n");
+
+ /* TODO: Map formats so we can check swizzles and print nicely */
+ pandecode_log("swizzle");
+ pandecode_swizzle(format.swizzle, MALI_RGBA8_UNORM);
+ pandecode_log_cont(",\n");
+
+ pandecode_prop("nr_channels = MALI_POSITIVE(%d)",
+ (format.nr_channels + 1));
+
+ pandecode_log(".unk2 = ");
+ pandecode_log_decoded_flags(sfbd_unk2_info, format.unk2);
+ pandecode_log_cont(",\n");
+
+ pandecode_prop("block = %s", pandecode_block_format(format.block));
+
+ pandecode_prop("unk3 = 0x%" PRIx32, format.unk3);
+
+ pandecode_indent--;
+ pandecode_log("},\n");
+}
+
+static void
+pandecode_shared_memory(const struct mali_shared_memory *desc, bool is_compute)
+{
+ pandecode_prop("stack_shift = 0x%x", desc->stack_shift);
+
+ if (desc->unk0)
+ pandecode_prop("unk0 = 0x%x", desc->unk0);
+
+ if (desc->shared_workgroup_count != 0x1F) {
+ pandecode_prop("shared_workgroup_count = %d", desc->shared_workgroup_count);
+ if (!is_compute)
+ pandecode_msg("XXX: wrong workgroup count for noncompute\n");
+ }
+
+ if (desc->shared_unk1 || desc->shared_shift) {
+ pandecode_prop("shared_unk1 = %X", desc->shared_unk1);
+ pandecode_prop("shared_shift = %X", desc->shared_shift);
+
+ if (!is_compute)
+ pandecode_msg("XXX: shared memory configured in noncompute shader");
+ }
+
+ if (desc->shared_zero) {
+ pandecode_msg("XXX: shared memory zero tripped\n");
+ pandecode_prop("shared_zero = 0x%" PRIx32, desc->shared_zero);
+ }
+
+ if (desc->shared_memory && !is_compute)
+ pandecode_msg("XXX: shared memory used in noncompute shader\n");
+
+ MEMORY_PROP(desc, scratchpad);
+ MEMORY_PROP(desc, shared_memory);
+ MEMORY_PROP(desc, unknown1);
+}
+