mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 23:18:20 +02:00
ail: add metadata width/height in tile helpers
for decompress kernels Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
This commit is contained in:
parent
9f1e2e5053
commit
942dd5aa66
1 changed files with 16 additions and 0 deletions
|
|
@ -227,6 +227,22 @@ ail_effective_height_sa(unsigned height_px, unsigned sample_count_sa)
|
|||
return height_px * (sample_count_sa >= 2 ? 2 : 1);
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
ail_metadata_width_tl(struct ail_layout *layout, unsigned level)
|
||||
{
|
||||
unsigned px = u_minify(layout->width_px, level);
|
||||
uint32_t sa = ail_effective_width_sa(px, layout->sample_count_sa);
|
||||
return DIV_ROUND_UP(sa, 16);
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
ail_metadata_height_tl(struct ail_layout *layout, unsigned level)
|
||||
{
|
||||
unsigned px = u_minify(layout->height_px, level);
|
||||
uint32_t sa = ail_effective_height_sa(px, layout->sample_count_sa);
|
||||
return DIV_ROUND_UP(sa, 16);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
ail_is_compressed(const struct ail_layout *layout)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue