ail: extract a blocksize helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
This commit is contained in:
committed by
Marge Bot
parent
aebecb2886
commit
8e20875651
@@ -257,6 +257,12 @@ ail_space_bits(unsigned x)
|
||||
|
||||
#define MOD_POT(x, y) (x) & ((y) - 1)
|
||||
|
||||
static inline uint32_t
|
||||
ail_get_blocksize_B(const struct ail_layout *layout)
|
||||
{
|
||||
return util_format_get_blocksize(layout->format);
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
ail_effective_width_sa(unsigned width_px, unsigned sample_count_sa)
|
||||
{
|
||||
|
||||
@@ -163,7 +163,7 @@ ail_tile(void *_tiled, void *_linear, const struct ail_layout *tiled_layout,
|
||||
{
|
||||
unsigned width_px = u_minify(tiled_layout->width_px, level);
|
||||
unsigned height_px = u_minify(tiled_layout->height_px, level);
|
||||
unsigned blocksize_B = util_format_get_blocksize(tiled_layout->format);
|
||||
unsigned blocksize_B = ail_get_blocksize_B(tiled_layout);
|
||||
|
||||
assert(level < tiled_layout->levels && "Mip level out of bounds");
|
||||
assert(ail_is_level_twiddled_uncompressed(tiled_layout, level) &&
|
||||
|
||||
Reference in New Issue
Block a user