pan/crc: Use RT selection loop in single RT case

The single RT case can now use a common code path.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
Loïc Molinari 2026-02-10 12:23:53 +01:00
parent f2a678ed45
commit 00f4ed9643

View file

@ -124,11 +124,10 @@ GENX(pan_select_crc_rt)(const struct pan_fb_info *fb, unsigned tile_size)
return best_rt;
#if PAN_ARCH <= 6
if (fb->rt_count == 1 && fb->rts[0].view && !fb->rts[0].discard &&
pan_image_view_has_crc(fb->rts[0].view) &&
renderblock_fits_in_single_pass(fb->rts[0].view, tile_size))
best_rt = 0;
#else
if (fb->rt_count > 1)
return best_rt;
#endif
for (unsigned i = 0; i < fb->rt_count; i++) {
/* Skip unusable RT. */
if (!fb->rts[i].view || fb->rts[i].discard ||
@ -146,7 +145,6 @@ GENX(pan_select_crc_rt)(const struct pan_fb_info *fb, unsigned tile_size)
if (best_rt == -1)
best_rt = i;
}
#endif
/* The selected RT must be fully covered for now in order to correctly
* initialize the CRC buffer. */