Module: Mesa Branch: master Commit: c25fe88ebf0939ac1972cc0994819c27408ca59e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c25fe88ebf0939ac1972cc0994819c27408ca59e
Author: Chia-I Wu <olva...@gmail.com> Date: Tue Jul 15 09:54:08 2014 +0800 ilo: raise texture size limits Report the hardware limits now that max-texture-size piglit test has been fixed. --- src/gallium/drivers/ilo/ilo_resource.c | 9 ++++++--- src/gallium/drivers/ilo/ilo_screen.c | 17 +++-------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c index 61464a2..359c635 100644 --- a/src/gallium/drivers/ilo/ilo_resource.c +++ b/src/gallium/drivers/ilo/ilo_resource.c @@ -63,10 +63,13 @@ struct tex_layout { }; /* - * We do not know if we will fail until we try to allocate the bo. - * So just set a limit on the texture size. + * From the Ivy Bridge PRM, volume 1 part 1, page 105: + * + * "In addition to restrictions on maximum height, width, and depth, + * surfaces are also restricted to a maximum size in bytes. This + * maximum is 2 GB for all products and all surface types." */ -static const size_t max_resource_size = 1u << 30; +static const size_t max_resource_size = 1u << 31; static void tex_layout_init_qpitch(struct tex_layout *layout) diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c index 4e4739c..e2a0e23 100644 --- a/src/gallium/drivers/ilo/ilo_screen.c +++ b/src/gallium/drivers/ilo/ilo_screen.c @@ -309,23 +309,12 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param) * Max WxHxD for 2D and CUBE Max WxHxD for 3D * GEN6 8192x8192x512 2048x2048x2048 * GEN7 16384x16384x2048 2048x2048x2048 - * - * However, when the texutre size is large, things become unstable. We - * require the maximum texture size to be 2^30 bytes in - * screen->can_create_resource(). Since the maximum pixel size is 2^4 - * bytes (PIPE_FORMAT_R32G32B32A32_FLOAT), textures should not have more - * than 2^26 pixels. - * - * For 3D textures, we have to set the maximum number of levels to 9, - * which has at most 2^24 pixels. For 2D textures, we set it to 14, - * which has at most 2^26 pixels. And for cube textures, we has to set - * it to 12. */ - return 14; + return (is->dev.gen >= ILO_GEN(7)) ? 15 : 14; case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: - return 9; - case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: return 12; + case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: + return (is->dev.gen >= ILO_GEN(7)) ? 15 : 14; case PIPE_CAP_TEXTURE_MIRROR_CLAMP: return false; case PIPE_CAP_BLEND_EQUATION_SEPARATE: _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit