summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.h12
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.c3
-rw-r--r--src/gallium/drivers/nvfx/nvfx_screen.c2
3 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h
index c0ec6e4895..f32ecd0b69 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.h
+++ b/src/gallium/drivers/nouveau/nouveau_screen.h
@@ -60,4 +60,16 @@ void nouveau_screen_fini(struct nouveau_screen *);
+static __inline__ unsigned
+RING_3D(unsigned mthd, unsigned size)
+{
+ return (7 << 13) | (size << 18) | mthd;
+}
+
+static __inline__ unsigned
+RING_3D_NI(unsigned mthd, unsigned size)
+{
+ return 0x40000000 | (7 << 13) | (size << 18) | mthd;
+}
+
#endif
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index a0fe4c5913..425786f00f 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -335,6 +335,9 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
return NULL;
}
+ /* this is necessary for the new RING_3D / statebuffer code */
+ BIND_RING(chan, screen->tesla, 7);
+
/* Sync notifier */
ret = nouveau_notifier_alloc(chan, 0xbeef0301, 1, &screen->sync);
if (ret) {
diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c
index 1f6e6e3497..e63e1abcea 100644
--- a/src/gallium/drivers/nvfx/nvfx_screen.c
+++ b/src/gallium/drivers/nvfx/nvfx_screen.c
@@ -418,6 +418,8 @@ nvfx_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
return NULL;
}
+ BIND_RING(chan, screen->eng3d, 7);
+
/* Static eng3d initialisation */
/* make the so big and don't worry about exact values
since we it will be thrown away immediately after use */