From 9c1de5c6b3a690ccba88cc308773aebe5e89ac51 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 19 Nov 2024 15:20:37 +0100 Subject: [PATCH] panvk: set correct max extents for images We updated maxImageDimension2D etc to report the actual max size, but we forgot to update GetPhysicalDeviceImageFormatProperties in the same way. Let's do that to make things consistent. This fixes the following CTS test-case: dEQP-VK.wsi.wayland.swapchain.create.image_extent Fixes: d5ed77800e0 ("panvk: Fix GetPhysicalDeviceProperties2() to report accurate info") Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/vulkan/panvk_physical_device.c | 22 ++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/panfrost/vulkan/panvk_physical_device.c b/src/panfrost/vulkan/panvk_physical_device.c index bd06d48a597..d53f1e4bd0f 100644 --- a/src/panfrost/vulkan/panvk_physical_device.c +++ b/src/panfrost/vulkan/panvk_physical_device.c @@ -1232,24 +1232,24 @@ get_image_format_properties(struct panvk_physical_device *physical_device, default: unreachable("bad vkimage type"); case VK_IMAGE_TYPE_1D: - maxExtent.width = 16384; + maxExtent.width = 1 << 16; maxExtent.height = 1; maxExtent.depth = 1; - maxMipLevels = 15; /* log2(maxWidth) + 1 */ - maxArraySize = 2048; + maxMipLevels = 17; /* log2(maxWidth) + 1 */ + maxArraySize = 1 << 16; break; case VK_IMAGE_TYPE_2D: - maxExtent.width = 16384; - maxExtent.height = 16384; + maxExtent.width = 1 << 16; + maxExtent.height = 1 << 16; maxExtent.depth = 1; - maxMipLevels = 15; /* log2(maxWidth) + 1 */ - maxArraySize = 2048; + maxMipLevels = 17; /* log2(maxWidth) + 1 */ + maxArraySize = 1 << 16; break; case VK_IMAGE_TYPE_3D: - maxExtent.width = 2048; - maxExtent.height = 2048; - maxExtent.depth = 2048; - maxMipLevels = 12; /* log2(maxWidth) + 1 */ + maxExtent.width = 1 << 16; + maxExtent.height = 1 << 16; + maxExtent.depth = 1 << 16; + maxMipLevels = 17; /* log2(maxWidth) + 1 */ maxArraySize = 1; break; }