diff --git a/src/panfrost/lib/pan_desc.c b/src/panfrost/lib/pan_desc.c index cd8eaf0bd85..0c5c0893ac5 100644 --- a/src/panfrost/lib/pan_desc.c +++ b/src/panfrost/lib/pan_desc.c @@ -1048,9 +1048,19 @@ pan_select_crc_rt(const struct pan_fb_info *fb) { int best_rt = -1; -#if PAN_ARCH <= 6 +#if PAN_ARCH <= 5 + /* CRC was introduced in v4 and MRT in v5 but unlike v6 there's no details + * how both work together. */ if (fb->rt_count > 1) return best_rt; + +#elif PAN_ARCH == 6 + /* On v6, all enabled RTs are used to compute a CRC (no crc_render_target + * field on the DBD). The write buffer size of the enabled color + * attachments for a tile must fit within 1600 bytes. */ + if (fb->rt_count > 1 && + pan_cbuf_bytes_per_pixel(fb) * fb->tile_size > 1600) + return best_rt; #endif for (unsigned i = 0; i < fb->rt_count; i++) {