Mesa (gallium-0.2): nouveau: Use PIPE_BUFFER_USAGE_CPU_* instead of custom.

Younes Manton ymanton at kemper.freedesktop.org
Sat Jan 10 19:12:20 UTC 2009


Module: Mesa
Branch: gallium-0.2
Commit: 7289c388f442fe532de52058f9167bc331920b1a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7289c388f442fe532de52058f9167bc331920b1a

Author: Younes Manton <younes.m at gmail.com>
Date:   Sat Dec  6 15:45:00 2008 -0500

nouveau: Use PIPE_BUFFER_USAGE_CPU_* instead of custom.

---

 src/gallium/drivers/nouveau/nouveau_winsys.h       |    3 +--
 src/gallium/drivers/nv40/nv40_miptree.c            |    2 +-
 .../winsys/drm/nouveau/nouveau_winsys_pipe.c       |    2 +-
 .../winsys/g3dvl/nouveau/nouveau_winsys_pipe.c     |    2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index 09726fd..5535ebb 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -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;
diff --git a/src/gallium/drivers/nv40/nv40_miptree.c b/src/gallium/drivers/nv40/nv40_miptree.c
index 5121434..00ce6be 100644
--- a/src/gallium/drivers/nv40/nv40_miptree.c
+++ b/src/gallium/drivers/nv40/nv40_miptree.c
@@ -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);
 
diff --git a/src/gallium/winsys/drm/nouveau/nouveau_winsys_pipe.c b/src/gallium/winsys/drm/nouveau/nouveau_winsys_pipe.c
index 086f368..fe10479 100644
--- a/src/gallium/winsys/drm/nouveau/nouveau_winsys_pipe.c
+++ b/src/gallium/winsys/drm/nouveau/nouveau_winsys_pipe.c
@@ -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) {
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c
index 17c677d..d841eb4 100644
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c
@@ -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;
 	}
 




More information about the mesa-commit mailing list