.unk3 = 0x4,
.flags = 0x8,
.swizzle = panfrost_translate_swizzle_4(swizzle),
- .unk4 = 0x8
+ .no_preload = true
};
if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
} else {
struct mali_rt_format null_rt = {
.unk1 = 0x4000000,
- .unk4 = 0x8
+ .no_preload = true
};
rts[cb].format = null_rt;
unsigned swizzle : 12;
- unsigned unk4 : 4;
+ unsigned zero : 3;
+
+ /* Disables MFBD preload. When this bit is set, the render target will
+ * be cleared every frame. When this bit is clear, the hardware will
+ * automatically wallpaper the render target back from main memory.
+ * Unfortunately, MFBD preload is very broken on Midgard, so in
+ * practice, this is a chicken bit that should always be set.
+ * Discovered by accident, as all good chicken bits are. */
+
+ unsigned no_preload : 1;
} __attribute__((packed));
struct bifrost_render_target {
pandecode_swizzle(format.swizzle);
- pandecode_prop("unk4 = 0x%" PRIx32, format.unk4);
+ pandecode_prop("no_preload = 0x%" PRIx32, format.no_preload);
+
+ if (format.zero)
+ pandecode_prop("zero = 0x%" PRIx32, format.zero);
pandecode_indent--;
pandecode_log("},\n");