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 <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32866>
This commit is contained in:
Erik Faye-Lund 2025-01-03 13:25:50 +01:00 committed by Marge Bot
parent 3a5c606d20
commit 365cd04375

View file

@ -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