llvmpipe: set max cube texture size to 4K x 4K
authorBrian Paul <brianp@vmware.com>
Mon, 17 Sep 2012 01:05:51 +0000 (19:05 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 18 Sep 2012 01:49:26 +0000 (19:49 -0600)
Before, the limit was 8K.  For 32-bit RGBA that would be require 1.5 GB
of memory (w/out mipmaps).  That's well beyond the LP_MAX_TEXTURE_SIZE
of 1GB.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_limits.h
src/gallium/drivers/llvmpipe/lp_screen.c

index fac34044089b1fe16f703ff3b7da7f96ac7d013e..3be24d6d64820995fda481b20928ba41275acf34 100644 (file)
@@ -46,6 +46,7 @@
 #define LP_MAX_TEXTURE_SIZE (1 * 1024 * 1024 * 1024ULL)  /* 1GB for now */
 #define LP_MAX_TEXTURE_2D_LEVELS 14  /* 8K x 8K for now */
 #define LP_MAX_TEXTURE_3D_LEVELS 11  /* 1K x 1K x 1K for now */
+#define LP_MAX_TEXTURE_CUBE_LEVELS 13  /* 4K x 4K for now */
 
 
 /** This must be the larger of LP_MAX_TEXTURE_2D/3D_LEVELS */
index a9f973cf74c791026153c1071493cf74000cb12d..5126cd6103624b592f937a1a05cb2f541cf7d54a 100644 (file)
@@ -140,7 +140,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
       return LP_MAX_TEXTURE_3D_LEVELS;
    case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
-      return LP_MAX_TEXTURE_2D_LEVELS;
+      return LP_MAX_TEXTURE_CUBE_LEVELS;
    case PIPE_CAP_BLEND_EQUATION_SEPARATE:
       return 1;
    case PIPE_CAP_INDEP_BLEND_ENABLE: