#undef DEFINE_CASE
-#define DEFINE_CASE(name) case MALI_MSAA_ ## name: return "MALI_MSAA_" #name
-static char *
-pandecode_msaa_mode(enum mali_msaa_mode mode)
-{
- switch (mode) {
- DEFINE_CASE(SINGLE);
- DEFINE_CASE(AVERAGE);
- DEFINE_CASE(MULTIPLE);
- DEFINE_CASE(LAYERED);
- default:
- unreachable("Impossible");
- return "";
- }
-}
-#undef DEFINE_CASE
-
static char *pandecode_attr_mode_short(enum mali_attr_mode mode)
{
switch(mode) {
}
}
-#define DEFINE_CASE(name) case MALI_BLOCK_## name: return "MALI_BLOCK_" #name
-static char *
-pandecode_block_format(enum mali_block_format fmt)
-{
- switch (fmt) {
- DEFINE_CASE(TILED);
- DEFINE_CASE(UNKNOWN);
- DEFINE_CASE(LINEAR);
- DEFINE_CASE(AFBC);
-
- default:
- unreachable("Invalid case");
- }
-}
-#undef DEFINE_CASE
-
#define DEFINE_CASE(name) case MALI_EXCEPTION_ACCESS_## name: return ""#name
static char *
pandecode_exception_access(unsigned access)
pandecode_log_decoded_flags(sfbd_unk2_info, format.unk2);
pandecode_log_cont(",\n");
- pandecode_prop("block = %s", pandecode_block_format(format.block));
+ pandecode_prop("block = %s", mali_block_format_as_str(format.block));
pandecode_prop("unk3 = 0x%" PRIx32, format.unk3);
pandecode_prop("unk3 = 0x%" PRIx32, format.unk3);
pandecode_prop("unk4 = 0x%" PRIx32, format.unk4);
- pandecode_prop("block = %s", pandecode_block_format(format.block));
+ pandecode_prop("block = %s", mali_block_format_as_str(format.block));
/* TODO: Map formats so we can check swizzles and print nicely */
pandecode_log("swizzle");
pandecode_log_decoded_flags(mfbd_fmt_flag_info, format.flags);
pandecode_log_cont(",\n");
- pandecode_prop("msaa = %s", pandecode_msaa_mode(format.msaa));
+ pandecode_prop("msaa = %s", mali_msaa_as_str(format.msaa));
/* In theory, the no_preload bit can be cleared to enable MFBD preload,
* which is a faster hardware-based alternative to the wallpaper method
pandecode_rt_format(rt->format);
- if (rt->format.block == MALI_BLOCK_AFBC) {
+ if (rt->format.block == MALI_BLOCK_FORMAT_AFBC) {
pandecode_log(".afbc = {\n");
pandecode_indent++;
pandecode_log_decoded_flags(mfbd_extra_flag_lo_info, fbx->flags_lo);
pandecode_log_cont(",\n");
- pandecode_prop("zs_block = %s", pandecode_block_format(fbx->zs_block));
+ pandecode_prop("zs_block = %s", mali_block_format_as_str(fbx->zs_block));
pandecode_prop("zs_samples = MALI_POSITIVE(%u)", fbx->zs_samples + 1);
- if (fbx->zs_block == MALI_BLOCK_AFBC) {
+ if (fbx->zs_block == MALI_BLOCK_FORMAT_AFBC) {
pandecode_log(".ds_afbc = {\n");
pandecode_indent++;