pan/crc: Enable CRC for multiple RTs on v6

v6 supports Transaction Elimination with multiple RTs at the condition
the write buffer size of the enabled color attachments for a tile
doesn't exceed 1600 bytes.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
Loïc Molinari 2026-02-11 13:53:14 +01:00
parent c566aaed2e
commit a4bd10c773

View file

@ -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++) {