llvmpipe: define max texture levels
authorBrian Paul <brianp@vmware.com>
Mon, 8 Mar 2010 20:36:34 +0000 (13:36 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 8 Mar 2010 23:26:43 +0000 (16:26 -0700)
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/llvmpipe/lp_texture.h

index f84ede675b3145c96b5a2bb6263b23cbf03e7a9c..2c6fd67eae8c5ae8bb1bef6a6d53e8f99c40983a 100644 (file)
@@ -107,11 +107,11 @@ llvmpipe_get_param(struct pipe_screen *screen, int param)
    case PIPE_CAP_TEXTURE_SHADOW_MAP:
       return 1;
    case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
-      return 13; /* max 4Kx4K */
+      return LP_MAX_TEXTURE_2D_LEVELS;
    case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
-      return 9;  /* max 256x256x256 */
+      return LP_MAX_TEXTURE_3D_LEVELS;
    case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
-      return 13; /* max 4Kx4K */
+      return LP_MAX_TEXTURE_2D_LEVELS;
    case PIPE_CAP_TGSI_CONT_SUPPORTED:
       return 1;
    case PIPE_CAP_BLEND_EQUATION_SEPARATE:
index 87c905bc027028cdd69fd9b9cf1bc8c9b0ab9d13..c511a01298731bac3b87b6ca3bf3703f007e43fa 100644 (file)
 #include "pipe/p_state.h"
 
 
+#define LP_MAX_TEXTURE_2D_LEVELS 13  /* 4K x 4K for now */
+#define LP_MAX_TEXTURE_3D_LEVELS 10  /* 512 x 512 x 512 for now */
+
+
 struct pipe_context;
 struct pipe_screen;
 struct llvmpipe_context;
@@ -42,8 +46,8 @@ struct llvmpipe_texture
 {
    struct pipe_texture base;
 
-   unsigned long level_offset[PIPE_MAX_TEXTURE_LEVELS];
-   unsigned stride[PIPE_MAX_TEXTURE_LEVELS];
+   unsigned long level_offset[LP_MAX_TEXTURE_2D_LEVELS];
+   unsigned stride[LP_MAX_TEXTURE_2D_LEVELS];
 
    /**
     * Display target, for textures with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET