softpipe: define SP_MAX_TEXTURE_2D/3D_LEVELS
authorBrian Paul <brianp@vmware.com>
Mon, 8 Mar 2010 20:56:44 +0000 (13:56 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 8 Mar 2010 23:26:43 +0000 (16:26 -0700)
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/softpipe/sp_texture.h

index 6ec63fe698af8c6c479b838eeb080cd3508c9a19..3405a043c6bf02e2924d5f063eb224b00009a45c 100644 (file)
@@ -83,11 +83,11 @@ softpipe_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 SP_MAX_TEXTURE_2D_LEVELS;
    case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
-      return 9;  /* max 256x256x256 */
+      return SP_MAX_TEXTURE_3D_LEVELS;
    case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
-      return 13; /* max 4Kx4K */
+      return SP_MAX_TEXTURE_2D_LEVELS;
    case PIPE_CAP_TGSI_CONT_SUPPORTED:
       return 1;
    case PIPE_CAP_BLEND_EQUATION_SEPARATE:
index 2ef64e1e7c31bec2a582a30379023cf1f37047a8..b54cf33ef5cc06c6ab5a6401c70446213caca351 100644 (file)
 #include "pipe/p_video_state.h"
 
 
+#define SP_MAX_TEXTURE_2D_LEVELS 13  /* 4K x 4K */
+#define SP_MAX_TEXTURE_3D_LEVELS 9   /* 512 x 512 x 512 */
+
+
 struct pipe_context;
 struct pipe_screen;
 struct softpipe_context;
@@ -42,8 +46,8 @@ struct softpipe_texture
 {
    struct pipe_texture base;
 
-   unsigned long level_offset[PIPE_MAX_TEXTURE_LEVELS];
-   unsigned stride[PIPE_MAX_TEXTURE_LEVELS];
+   unsigned long level_offset[SP_MAX_TEXTURE_2D_LEVELS];
+   unsigned stride[SP_MAX_TEXTURE_2D_LEVELS];
 
    /* The data is held here:
     */