summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvc0/nvc0_screen.c
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-12-11 16:23:43 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-12-11 16:24:27 +0100
commit5138ac033ad3708e2b82f2beebc887f65a77309e (patch)
treeb7b76fc8bd95046f8b389418f17defd67c7015f6 /src/gallium/drivers/nvc0/nvc0_screen.c
parent67d0c3dd792bc2d188f5f53b7e00eb120758d66c (diff)
nvc0: support user clip planes
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_screen.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_screen.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
index fb100e5233..f0d06be9ce 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -457,11 +457,21 @@ nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
nouveau_resource_init(&screen->text_heap, 0, 1 << 20);
- ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 12, 5 << 16,
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 12, 6 << 16,
&screen->uniforms);
if (ret)
goto fail;
+ /* auxiliary constants (6 user clip planes, base instance id) */
+ BEGIN_RING(chan, RING_3D(CB_SIZE), 3);
+ OUT_RING (chan, 256);
+ OUT_RELOCh(chan, screen->uniforms, 5 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->uniforms, 5 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ for (i = 0; i < 5; ++i) {
+ BEGIN_RING(chan, RING_3D(CB_BIND(i)), 1);
+ OUT_RING (chan, (15 << 4) | 1);
+ }
+
screen->tls_size = 4 * 4 * 32 * 128 * 4;
ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17,
screen->tls_size, &screen->tls);