softpipe: set max cube texture size to 4Kx4K
authorBrian Paul <brianp@vmware.com>
Sun, 18 Mar 2012 16:45:11 +0000 (10:45 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 20 Mar 2012 14:23:32 +0000 (08:23 -0600)
commit2cbccfdcb09322f5711cff995f9a2953af355d35
tree33928f216b8798471b85026a161bd569deb393ed
parent73fd269d2f5aa2a0b9bc03ef904b81e263e3cc37
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 <yuanhan.liu@linux.intel.com>
src/gallium/drivers/softpipe/sp_limits.h
src/gallium/drivers/softpipe/sp_screen.c