[Mesa-dev] [PATCH 3/6] nvc0: Add support for autobinding

Maarten Lankhorst m.b.lankhorst at gmail.com
Thu Dec 1 16:03:54 PST 2011


Signed-off-by: Maarten Lankhorst <m.b.lankhorst at gmail.com>

---
 src/gallium/drivers/nvc0/nvc0_winsys.h |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/nvc0/nvc0_winsys.h b/src/gallium/drivers/nvc0/nvc0_winsys.h
index 0fcf994..dd4c887 100644
--- a/src/gallium/drivers/nvc0/nvc0_winsys.h
+++ b/src/gallium/drivers/nvc0/nvc0_winsys.h
@@ -20,6 +20,17 @@
 #define NV04_PFIFO_MAX_PACKET_LEN 2047
 #endif
 
+static INLINE void
+nouveau_bo_validate(struct nouveau_channel *chan,
+                    struct nouveau_bo *bo, unsigned flags)
+{
+   nouveau_reloc_emit(chan, NULL, 0, NULL, bo, 0, 0, flags, 0, 0);
+}
+
+#ifdef NVC0_USE_AUTOBIND
+#include "nouveau/nvc0_pushbuf.h"
+#else
+
 #define NVC0_SUBCH_3D 1
 #define NVC0_SUBCH_2D 2
 #define NVC0_SUBCH_MF 3
@@ -44,13 +55,6 @@ nouveau_bo_tile_layout(const struct nouveau_bo *bo)
    return bo->tile_flags & NOUVEAU_BO_TILE_LAYOUT_MASK;
 }
 
-static INLINE void
-nouveau_bo_validate(struct nouveau_channel *chan,
-                    struct nouveau_bo *bo, unsigned flags)
-{
-   nouveau_reloc_emit(chan, NULL, 0, NULL, bo, 0, 0, flags, 0, 0);
-}
-
 /* incremental methods */
 static INLINE void
 BEGIN_RING(struct nouveau_channel *chan, uint32_t mthd, unsigned size)
@@ -116,5 +120,6 @@ BIND_RING(struct nouveau_channel *chan, struct nouveau_grobj *gr, unsigned s)
    BEGIN_RING(chan, RING_GR(gr, 0x0000), 1);
    OUT_RING  (chan, gr->grclass);
 }
+#endif
 
 #endif
-- 
1.7.7.3





More information about the mesa-dev mailing list