diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index eaa2b7e5b33..8c119168a16 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -219,11 +219,11 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param) return 1; case PIPE_CAP_MAX_TEXTURE_2D_SIZE: - return 4096; + return 1 << (MAX_MIP_LEVELS - 1); + case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: - return 13; case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: - return 13; + return MAX_MIP_LEVELS; case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: /* Hardware is natively upper left */ diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index 67c9805e6c4..19e537fcebf 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -232,8 +232,11 @@ typedef uint64_t mali_ptr; #define MALI_POSITIVE(dim) (dim - 1) -/* 8192x8192 */ -#define MAX_MIP_LEVELS (13) +/* 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 MAX_MIP_LEVELS (14) /* Used for lod encoding. Thanks @urjaman for pointing out these routines can * be cleaned up a lot. */