mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 07:40:11 +01:00
v3dv: fix slice size for miplevels >= 2
We want to store the slice size in pixels not the level size
after padding to a power of 2 we use miplevels >= 2.
Fixes: 1cb2d2a5ee ('v3dv: store slice dimensions in pixels')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23739>
This commit is contained in:
parent
107d29765b
commit
cec030a233
1 changed files with 5 additions and 5 deletions
|
|
@ -140,18 +140,18 @@ v3d_setup_plane_slices(struct v3dv_image *image, uint8_t plane,
|
|||
for (int32_t i = image->vk.mip_levels - 1; i >= 0; i--) {
|
||||
struct v3d_resource_slice *slice = &image->planes[plane].slices[i];
|
||||
|
||||
slice->width = u_minify(width, i);
|
||||
slice->height = u_minify(height, i);
|
||||
|
||||
uint32_t level_width, level_height, level_depth;
|
||||
if (i < 2) {
|
||||
level_width = u_minify(width, i);
|
||||
level_height = u_minify(height, i);
|
||||
level_width = slice->width;
|
||||
level_height = slice->height;
|
||||
} else {
|
||||
level_width = u_minify(pot_width, i);
|
||||
level_height = u_minify(pot_height, i);
|
||||
}
|
||||
|
||||
slice->width = level_width;
|
||||
slice->height = level_height;
|
||||
|
||||
if (i < 1)
|
||||
level_depth = u_minify(depth, i);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue