panvk: Bump the max image size on v11+

We have more bits to encode the resource size there, so let's increase
the max limits.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
This commit is contained in:
Boris Brezillon 2025-06-24 11:52:13 +02:00 committed by Marge Bot
parent c2c91e78fd
commit d36e6af329
2 changed files with 9 additions and 5 deletions

View file

@ -764,7 +764,9 @@ panvk_GetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice,
static VkExtent3D
get_max_2d_image_size(struct panvk_physical_device *phys_dev, VkFormat format)
{
const uint32_t max_img_size_B = UINT32_MAX;
const unsigned arch = pan_arch(phys_dev->kmod.props.gpu_prod_id);
const uint64_t max_img_size_B =
arch <= 10 ? u_uintN_max(32) : u_uintN_max(48);
const enum pipe_format pfmt = vk_format_to_pipe_format(format);
const uint32_t fmt_blksize = util_format_get_blocksize(pfmt);
/* Evenly split blocks across all axis. */
@ -785,7 +787,9 @@ get_max_2d_image_size(struct panvk_physical_device *phys_dev, VkFormat format)
static VkExtent3D
get_max_3d_image_size(struct panvk_physical_device *phys_dev, VkFormat format)
{
const uint32_t max_img_size_B = UINT32_MAX;
const unsigned arch = pan_arch(phys_dev->kmod.props.gpu_prod_id);
const uint64_t max_img_size_B =
arch <= 10 ? u_uintN_max(32) : u_uintN_max(48);
enum pipe_format pfmt = vk_format_to_pipe_format(format);
uint32_t fmt_blksize = util_format_get_blocksize(pfmt);
/* Evenly split blocks across each axis. */

View file

@ -552,9 +552,9 @@ panvk_per_arch(get_physical_device_properties)(
* patched to handle the size/stride field extension.
*/
.maxImageDimension1D = (1 << 16),
.maxImageDimension2D = (1 << 14) - 1,
.maxImageDimension3D = (1 << 9),
.maxImageDimensionCube = (1 << 14) - 1,
.maxImageDimension2D = PAN_ARCH <= 10 ? (1 << 14) - 1 : (1 << 16),
.maxImageDimension3D = PAN_ARCH <= 10 ? (1 << 9) : (1 << 14),
.maxImageDimensionCube = PAN_ARCH <= 10 ? (1 << 14) - 1 : (1 << 16),
.maxImageArrayLayers = (1 << 16),
/* Currently limited by the 1D texture size, which is 2^16.
* TODO: If we expose buffer views as 2D textures, we can increase the