pan/bi: Add bi_count_succ_reads helper
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 6 Jan 2021 19:50:03 +0000 (14:50 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 8 Feb 2021 14:07:29 +0000 (14:07 +0000)
commit3f1cda5284403f3f9e93ca1fa7eca703c87a0b3f
tree79ee364d30442eb350a2f051fa922352cbecb658
parent06bde2cc31e99f309f7e06d18a236870f9d94c08
pan/bi: Add bi_count_succ_reads helper

The number of register writes in a tuple must be bounded by a number
based on the number of register reads in the succeeding tuple, since
writes and reads are interleaved. This helper calculates that number of
reads, noting that not every read actually counts - if the preceding
tuple writes to a read source, that will become a temporary instead of
consuming a register slot.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354>
src/panfrost/bifrost/bi_schedule.c