nouveau: Use PIPE_BUFFER_USAGE_CPU_* instead of custom.
authorYounes Manton <younes.m@gmail.com>
Sat, 6 Dec 2008 20:45:00 +0000 (15:45 -0500)
committerYounes Manton <younes.m@gmail.com>
Sat, 10 Jan 2009 18:52:05 +0000 (13:52 -0500)
src/gallium/drivers/nouveau/nouveau_winsys.h
src/gallium/drivers/nv40/nv40_miptree.c
src/gallium/winsys/drm/nouveau/nouveau_winsys_pipe.c
src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c

index 09726fd892dbd799ae4e445f780d8d8c9cb4e314..5535ebb6a99587299b71633849d688896dd130fe 100644 (file)
@@ -20,8 +20,7 @@
 #define NOUVEAU_TEXTURE_USAGE_LINEAR (1 << 16)
 
 #define NOUVEAU_BUFFER_USAGE_TEXTURE (1 << 16)
-#define NOUVEAU_BUFFER_USAGE_CPU     (1 << 17)
-#define NOUVEAU_BUFFER_USAGE_ZETA    (1 << 18)
+#define NOUVEAU_BUFFER_USAGE_ZETA    (1 << 17)
 
 struct nouveau_winsys {
        struct nouveau_context *nv;
index 5121434b542e569b884ed2d598d17d42b2101964..00ce6be985a71f11b00eeb9d5a90c5f3bdd6e643 100644 (file)
@@ -93,7 +93,7 @@ nv40_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
        }
 
        if (pt->tex_usage & PIPE_TEXTURE_USAGE_DYNAMIC)
-               buf_usage |= NOUVEAU_BUFFER_USAGE_CPU;
+               buf_usage |= PIPE_BUFFER_USAGE_CPU_READ_WRITE;
 
        nv40_miptree_layout(mt);
 
index 086f3683198c5dde3306b5db8b6e12947fb88aa8..fe10479db700e450f4da45d5b8eacb6582eeb551 100644 (file)
@@ -49,7 +49,7 @@ nouveau_pipe_bo_create(struct pipe_winsys *pws, unsigned alignment,
        if (usage & PIPE_BUFFER_USAGE_PIXEL) {
                if (usage & NOUVEAU_BUFFER_USAGE_TEXTURE)
                        flags |= NOUVEAU_BO_GART;
-               if (!(usage & NOUVEAU_BUFFER_USAGE_CPU))
+               if (!(usage & PIPE_BUFFER_USAGE_CPU_READ_WRITE))
                        flags |= NOUVEAU_BO_VRAM;
 
                switch (dev->chipset & 0xf0) {
index 17c677d83eb340e814e6bf2d099dc9cf8aa386ac..d841eb4a044a42aa83c25ffff8e2291e986702ed 100644 (file)
@@ -112,7 +112,7 @@ nouveau_pipe_bo_create(struct pipe_winsys *pws, unsigned alignment,
        if (usage & PIPE_BUFFER_USAGE_PIXEL) {
                if (usage & NOUVEAU_BUFFER_USAGE_TEXTURE)
                        flags |= NOUVEAU_BO_GART;
-               if (!(usage & NOUVEAU_BUFFER_USAGE_CPU))
+               if (!(usage & PIPE_BUFFER_USAGE_CPU_READ_WRITE))
                        flags |= NOUVEAU_BO_VRAM;
        }