Module: Mesa Branch: master Commit: 2cbccfdcb09322f5711cff995f9a2953af355d35 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2cbccfdcb09322f5711cff995f9a2953af355d35
Author: Brian Paul <[email protected]> Date: Sun Mar 18 10:45:11 2012 -0600 softpipe: set max cube texture size to 4Kx4K The max size was 16Kx16K so a 4 byte/pixel, six-sided cube would require 6 GBytes of memory. If mipmapped, 8 GB. Reduce the max size to 4K to make the total size more reasonable. Fixes a crash with the new piglit max-texture-size test. Reviewed-by: Yuanhan Liu <[email protected]> --- src/gallium/drivers/softpipe/sp_limits.h | 1 + src/gallium/drivers/softpipe/sp_screen.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/gallium/drivers/softpipe/sp_limits.h b/src/gallium/drivers/softpipe/sp_limits.h index a7a24c9..ada5c0c 100644 --- a/src/gallium/drivers/softpipe/sp_limits.h +++ b/src/gallium/drivers/softpipe/sp_limits.h @@ -32,6 +32,7 @@ #define SP_MAX_TEXTURE_2D_LEVELS 15 /* 16K x 16K */ #define SP_MAX_TEXTURE_3D_LEVELS 9 /* 512 x 512 x 512 */ +#define SP_MAX_TEXTURE_CUBE_LEVELS 13 /* 4K x 4K */ /** Max surface size */ diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index c983ef5..183ed9a 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -94,7 +94,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: return SP_MAX_TEXTURE_3D_LEVELS; case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: - return SP_MAX_TEXTURE_2D_LEVELS; + return SP_MAX_TEXTURE_CUBE_LEVELS; case PIPE_CAP_BLEND_EQUATION_SEPARATE: return 1; case PIPE_CAP_INDEP_BLEND_ENABLE: _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
