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 e42e872de757257f3c2998b8e25e09b24d87a95e..66c26360cb2e582561615ea2206bba822430a2ab 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 192074e7471c8fe382e8b5f1f5f037870628cd5a..e2e69420eae63b70533e9f78042c26333ba177d5 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 c540594b9495924359717ebfe3eb6be22ff2b65b..044437e75fa290f3c9e704f8b3ea168359ab1fc5 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;
 };