diff options
author | Eric Anholt <[email protected]> | 2020-05-06 14:43:02 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-13 19:18:16 +0000 |
commit | 2e4ddb6353d1fea70d4744e7ea70461dd36214b0 (patch) | |
tree | c71c866306cf041be8d33cc5c5a3cd2c1552b767 /src | |
parent | 1f7d1541df8a9ea040f893fc6267a3d4ea6ebf26 (diff) |
freedreno/a4xx+: Increase max texture size to 16384.
Noticed when poking around with texture layouts and found that my big
texture layout from the blob buffer overflowed. Values come from
http://vulkan.gpuinfo.org for Adreno 418, 512, 630.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4931>
Diffstat (limited to 'src')
-rw-r--r-- | src/freedreno/fdl/freedreno_layout.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_gmem.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_screen.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_util.h | 2 |
4 files changed, 10 insertions, 6 deletions
diff --git a/src/freedreno/fdl/freedreno_layout.h b/src/freedreno/fdl/freedreno_layout.h index 011cf131dea..a6a12ba2333 100644 --- a/src/freedreno/fdl/freedreno_layout.h +++ b/src/freedreno/fdl/freedreno_layout.h @@ -75,7 +75,7 @@ * texture. */ -#define FDL_MAX_MIP_LEVELS 14 +#define FDL_MAX_MIP_LEVELS 15 struct fdl_slice { uint32_t offset; /* offset of first layer in slice */ diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.h b/src/gallium/drivers/freedreno/freedreno_gmem.h index 35fc9c30549..6a98e260893 100644 --- a/src/gallium/drivers/freedreno/freedreno_gmem.h +++ b/src/gallium/drivers/freedreno/freedreno_gmem.h @@ -62,7 +62,7 @@ struct fd_gmem_stateobj { uint8_t num_vsc_pipes; /* number of pipes for a20x */ struct fd_vsc_pipe vsc_pipe[32]; - struct fd_tile tile[512]; + struct fd_tile tile[2048]; struct list_head node; }; diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index fd15e1fe54b..d19f6483e5f 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -403,9 +403,15 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) /* Texturing. */ case PIPE_CAP_MAX_TEXTURE_2D_SIZE: - return 1 << (MAX_MIP_LEVELS - 1); + if (is_a6xx(screen) || is_a5xx(screen) || is_a4xx(screen)) + return 16384; + else + return 8192; case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: - return MAX_MIP_LEVELS; + if (is_a6xx(screen) || is_a5xx(screen) || is_a4xx(screen)) + return 15; + else + return 14; case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: return 11; diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index c2380c86303..806f81639b3 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -50,8 +50,6 @@ enum adreno_pa_su_sc_draw fd_polygon_mode(unsigned mode); enum adreno_stencil_op fd_stencil_op(unsigned op); #define A3XX_MAX_MIP_LEVELS 14 -/* TBD if it is same on a2xx, but for now: */ -#define MAX_MIP_LEVELS A3XX_MAX_MIP_LEVELS #define A2XX_MAX_RENDER_TARGETS 1 #define A3XX_MAX_RENDER_TARGETS 4 |