pan/bi: Add "lanes per warp" accessor

Varies by architecture version.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10022>
This commit is contained in:
Alyssa Rosenzweig 2021-05-07 10:16:50 -04:00 committed by Marge Bot
parent 7e4ee9bd2f
commit 4055b99de4
1 changed files with 11 additions and 0 deletions

View File

@ -55,4 +55,15 @@ bifrost_get_quirks(unsigned product_id)
}
}
/* How many lanes per architectural warp (subgroup)? Used to lower divergent
* indirects. */
static inline unsigned
bifrost_lanes_per_warp(unsigned product_id)
{
unsigned major = product_id >> 12;
assert(major == 6 || major == 7);
return (major == 7) ? 8 : 4;
}
#endif