mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 17:00:13 +01:00
ac/surface: use align with NPOT for estimating surface size
ac_estimate_size() triggers an assertion because the block size isn't aligned to a power of two for ASTC formats. Cc: mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35879>
This commit is contained in:
parent
25536c7d4d
commit
cb6f2d9409
1 changed files with 2 additions and 2 deletions
|
|
@ -1205,8 +1205,8 @@ static uint64_t ac_estimate_size(const struct ac_surf_config *config,
|
|||
assert(bpp);
|
||||
unsigned num_samples = MAX2(1, config->info.samples);
|
||||
unsigned bpe = bpp / 8;
|
||||
unsigned width = align(in_width, align_width * blk_w);
|
||||
unsigned height = align(in_height , align_height * blk_h);
|
||||
unsigned width = util_align_npot(in_width, align_width * blk_w);
|
||||
unsigned height = util_align_npot(in_height , align_height * blk_h);
|
||||
unsigned depth = align(config->is_3d ? config->info.depth :
|
||||
config->is_cube ? 6 : config->info.array_size, align_depth);
|
||||
unsigned tile_size_bytes = align_width * align_height * align_depth * num_samples * bpe;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue