diff --git a/.pick_status.json b/.pick_status.json index 8a89a589836..9a8cae96778 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1417,7 +1417,7 @@ "description": "panfrost: Raise maximum texture size", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 432351ba72d..593f158087d 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -218,11 +218,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 f585d9ebd23..31550a15995 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) /* Cubemap bloats everything up */ #define MAX_CUBE_FACES (6)