From: jzielins Date: Wed, 29 Jul 2020 11:27:00 +0000 (+0200) Subject: swr: Bump maximum 2D texture size to 16kx16k X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=26dd8f80453fdd9b9c34509b52c6c888416cee0b swr: Bump maximum 2D texture size to 16kx16k This may be required by some applications, even though not all texture formats will be below 2GB limit. This change also increases the maximum size of render target, that was inadvertently lowered some time ago. Reviewed-by: Krzysztof Raszkowski Reviewed-by: Bruce Cherniak Part-of: --- diff --git a/src/gallium/drivers/swr/rasterizer/core/knobs.h b/src/gallium/drivers/swr/rasterizer/core/knobs.h index 8dab50dab01..798e5684025 100644 --- a/src/gallium/drivers/swr/rasterizer/core/knobs.h +++ b/src/gallium/drivers/swr/rasterizer/core/knobs.h @@ -110,8 +110,8 @@ // total # of hot tiles available. This should be enough to // fully render a 16kx16k 128bpp render target -#define KNOB_NUM_HOT_TILES_X 256 -#define KNOB_NUM_HOT_TILES_Y 256 +#define KNOB_NUM_HOT_TILES_X 512 +#define KNOB_NUM_HOT_TILES_Y 512 #define KNOB_COLOR_HOT_TILE_FORMAT R32G32B32A32_FLOAT #define KNOB_DEPTH_HOT_TILE_FORMAT R32_FLOAT #define KNOB_STENCIL_HOT_TILE_FORMAT R8_UINT diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp index 20a10004ab2..1d0bedddb3c 100644 --- a/src/gallium/drivers/swr/swr_screen.cpp +++ b/src/gallium/drivers/swr/swr_screen.cpp @@ -52,7 +52,9 @@ * XXX Check max texture size values against core and sampler. */ #define SWR_MAX_TEXTURE_SIZE (2 * 1024 * 1024 * 1024ULL) /* 2GB */ -#define SWR_MAX_TEXTURE_2D_SIZE 8192 +/* Not all texture formats can fit into 2GB limit, but we have to + live with that. See lp_limits.h for more details */ +#define SWR_MAX_TEXTURE_2D_SIZE 16384 #define SWR_MAX_TEXTURE_3D_LEVELS 12 /* 2K x 2K x 2K for now */ #define SWR_MAX_TEXTURE_CUBE_LEVELS 14 /* 8K x 8K for now */ #define SWR_MAX_TEXTURE_ARRAY_LAYERS 512 /* 8K x 512 / 8K x 8K x 512 */