mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
pvr: fix mipmap alignment for non-32bpp textures
There is no alignment necessary between mip levels.
Fixes test cases:
dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_non_square_fastest
dEQP-GLES2.functional.texture.mipmap.2d.generate.a8_non_square_nicest
dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_non_square_fastest
dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_non_square_nicest
dEQP-GLES3.functional.texture.mipmap.2d.generate.a8_non_square_fastest
dEQP-GLES3.functional.texture.mipmap.2d.generate.a8_non_square_nicest
dEQP-GLES3.functional.texture.mipmap.2d.generate.l8_non_square_fastest
dEQP-GLES3.functional.texture.mipmap.2d.generate.l8_non_square_nicest
Fixes: 8991e64641 ("pvr: Add a Vulkan driver for Imagination Technologies...")
Signed-off-by: Iliyan Dinev <iliyan.dinev@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
This commit is contained in:
parent
fa889ffec7
commit
1d0f23752c
1 changed files with 0 additions and 6 deletions
|
|
@ -88,11 +88,6 @@ static void pvr_image_setup_mip_levels(struct pvr_image *image)
|
|||
VkExtent3D extent =
|
||||
vk_image_extent_to_elements(&image->vk, image->physical_extent);
|
||||
|
||||
/* Mip-mapped textures that are non-dword aligned need dword-aligned levels
|
||||
* so they can be TQd from.
|
||||
*/
|
||||
const uint32_t level_alignment = image->vk.mip_levels > 1 ? 4 : 1;
|
||||
|
||||
assert(image->vk.mip_levels <= ARRAY_SIZE(image->mip_levels));
|
||||
|
||||
image->layer_size = 0;
|
||||
|
|
@ -105,7 +100,6 @@ static void pvr_image_setup_mip_levels(struct pvr_image *image)
|
|||
mip_level->size = image->vk.samples * mip_level->pitch *
|
||||
mip_level->height_pitch *
|
||||
ALIGN(extent.depth, extent_alignment);
|
||||
mip_level->size = ALIGN(mip_level->size, level_alignment);
|
||||
mip_level->offset = image->layer_size;
|
||||
|
||||
image->layer_size += mip_level->size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue