vk/image: Fix the extent adjustment of non-compressed views

When creating a non-compressed view of a compressed image, we need to
divide the extent by the image block size not the view block size.

Fixes: 8ddc527ba4 ("vk/image: Fix the view extent of uncompressed views of compressed images")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31439>
This commit is contained in:
Boris Brezillon
2024-09-26 08:42:12 +02:00
committed by Marge Bot
parent c79470a37c
commit 790759dfaf
2 changed files with 3 additions and 2 deletions

View File

@@ -543,7 +543,7 @@ vk_image_view_init(struct vk_device *device,
if (vk_format_is_compressed(image->format) &&
!vk_format_is_compressed(image_view->format)) {
const struct util_format_description *fmt =
vk_format_description(image_view->format);
vk_format_description(image->format);
/* Non-compressed view of compressed image only works for single MIP
* views.