nv: define NV30/40/50_MAX_TEXTURE_LEVELS
authorBrian Paul <brianp@vmware.com>
Mon, 8 Mar 2010 21:02:38 +0000 (14:02 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 8 Mar 2010 23:26:44 +0000 (16:26 -0700)
src/gallium/drivers/nv30/nv30_state.h
src/gallium/drivers/nv40/nv40_state.h
src/gallium/drivers/nv50/nv50_context.h

index e42e872..66c2636 100644 (file)
@@ -70,6 +70,8 @@ struct nv30_fragment_program {
        struct nouveau_stateobj *so;
 };
 
+#define NV30_MAX_TEXTURE_LEVELS  16
+
 struct nv30_miptree {
        struct pipe_texture base;
        struct nouveau_bo *bo;
@@ -80,7 +82,7 @@ struct nv30_miptree {
        struct {
                uint pitch;
                uint *image_offset;
-       } level[PIPE_MAX_TEXTURE_LEVELS];
+       } level[NV30_MAX_TEXTURE_LEVELS];
 };
 
 #endif
index 192074e..e2e6942 100644 (file)
@@ -73,6 +73,8 @@ struct nv40_fragment_program {
        struct nouveau_stateobj *so;
 };
 
+#define NV40_MAX_TEXTURE_LEVELS  16
+
 struct nv40_miptree {
        struct pipe_texture base;
        struct nouveau_bo *bo;
@@ -83,7 +85,7 @@ struct nv40_miptree {
        struct {
                uint pitch;
                uint *image_offset;
-       } level[PIPE_MAX_TEXTURE_LEVELS];
+       } level[NV40_MAX_TEXTURE_LEVELS];
 };
 
 #endif
index c540594..044437e 100644 (file)
@@ -90,10 +90,12 @@ struct nv50_miptree_level {
        unsigned tile_mode;
 };
 
+#define NV50_MAX_TEXTURE_LEVELS 16
+
 struct nv50_miptree {
        struct nouveau_miptree base;
 
-       struct nv50_miptree_level level[PIPE_MAX_TEXTURE_LEVELS];
+       struct nv50_miptree_level level[NV50_MAX_TEXTURE_LEVELS];
        int image_nr;
        int total_size;
 };