mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 08:20:41 +02:00
panfrost: implement a driver-specific max-miplevel
The previous define was common for all panfrost code, but for Vulkan we should probably use the real hardware-limits. So let's introduce a GL-driver specific define here, and use that instead. This lets us change the other define to the real HW limitation. Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
This commit is contained in:
parent
2b1db3de7b
commit
d5c2d152a5
4 changed files with 10 additions and 8 deletions
|
|
@ -56,6 +56,12 @@ 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
|
||||
|
||||
/* How many power-of-two levels in the BO cache do we want? 2^12
|
||||
* minimum chosen as it is the page size that all allocations are
|
||||
* rounded to */
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ struct panfrost_resource {
|
|||
bool crc;
|
||||
|
||||
/* Has anything been written to this slice? */
|
||||
BITSET_DECLARE(data, MAX_MIP_LEVELS);
|
||||
BITSET_DECLARE(data, PAN_MAX_MIP_LEVELS);
|
||||
} valid;
|
||||
|
||||
/* Whether the modifier can be changed */
|
||||
|
|
|
|||
|
|
@ -236,11 +236,11 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||
return 1;
|
||||
|
||||
case PIPE_CAP_MAX_TEXTURE_2D_SIZE:
|
||||
return 1 << (MAX_MIP_LEVELS - 1);
|
||||
return 1 << (PAN_MAX_MIP_LEVELS - 1);
|
||||
|
||||
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
|
||||
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
|
||||
return MAX_MIP_LEVELS;
|
||||
return PAN_MAX_MIP_LEVELS;
|
||||
|
||||
case PIPE_CAP_FS_COORD_ORIGIN_LOWER_LEFT:
|
||||
case PIPE_CAP_FS_COORD_PIXEL_CENTER_INTEGER:
|
||||
|
|
|
|||
|
|
@ -42,11 +42,7 @@ typedef uint64_t mali_ptr;
|
|||
#define MALI_EXTRACT_TYPE(fmt) ((fmt)&0xe0)
|
||||
#define MALI_EXTRACT_INDEX(pixfmt) (((pixfmt) >> 12) & 0xFF)
|
||||
|
||||
/* 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)
|
||||
#define MAX_MIP_LEVELS (17)
|
||||
|
||||
#define MAX_IMAGE_PLANES (3)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue