From 365cd04375baeb8c607c1a49e85e9a364e193a08 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 3 Jan 2025 13:25:50 +0100 Subject: [PATCH] panfrost: do not artificially limit texture-sizes We're already limiting the maximum texture-size based on the available system memory, so we shouldn't really need to limit this here. In addition, the state-tracker also limits the max framebuffer size to 16384, so we don't have to worry about limiting this to the framebuffer size either. So I don't think we have a good reason to artificially limit the texture size here. This allows us to support larger textures than 8192, which is especially useful to support OpenCL images with RustiCL. Unfortunately, while the HW supports up to 64k texture sizes, Gallium currently caps us at 32k. So let's stick with that as the new limit for now. Acked-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/pan_device.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_device.h b/src/gallium/drivers/panfrost/pan_device.h index 4795fdba1b7..2478ead9e06 100644 --- a/src/gallium/drivers/panfrost/pan_device.h +++ b/src/gallium/drivers/panfrost/pan_device.h @@ -63,11 +63,9 @@ extern "C" { /* Driver limits */ #define PAN_MAX_CONST_BUFFERS 16 -/* Mali hardware can texture up to 65536 x 65536 x 65536 and render up to 16384 - * x 16384, but 8192 x 8192 should be enough for anyone. The OpenGL game - * "Cathedral" requires a texture of width 8192 to start. - */ -#define PAN_MAX_MIP_LEVELS 14 +/* TODO: Mali hardware can texture up to 64k textures, but the + * Gallium interface limits us to 32k at the moment */ +#define PAN_MAX_MIP_LEVELS 16 #define PAN_MAX_TEXEL_BUFFER_ELEMENTS 65536