summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_query.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2009-02-05 18:40:38 +1000
committerBen Skeggs <skeggsb@gmail.com>2009-02-05 18:42:17 +1000
commit75f0b38d9ea4a7318b0d661712dda15e24707395 (patch)
treef139e7ba0692cabad7b59fc5a0af55fa1befda39 /src/gallium/drivers/nv50/nv50_query.c
parentff8dff017e537c6db4c86aad43e92b768cb187e4 (diff)
nv50: stop using nouveau_push.h, it's evil
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_query.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_query.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/gallium/drivers/nv50/nv50_query.c b/src/gallium/drivers/nv50/nv50_query.c
index 1b3a41340a..20745ceab8 100644
--- a/src/gallium/drivers/nv50/nv50_query.c
+++ b/src/gallium/drivers/nv50/nv50_query.c
@@ -71,12 +71,14 @@ static void
nv50_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
{
struct nv50_context *nv50 = nv50_context(pipe);
+ struct nouveau_channel *chan = nv50->screen->nvws->channel;
+ struct nouveau_grobj *tesla = nv50->screen->tesla;
struct nv50_query *q = nv50_query(pq);
- BEGIN_RING(tesla, 0x1530, 1);
- OUT_RING (1);
- BEGIN_RING(tesla, 0x1514, 1);
- OUT_RING (1);
+ BEGIN_RING(chan, tesla, 0x1530, 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, tesla, 0x1514, 1);
+ OUT_RING (chan, 1);
q->ready = FALSE;
}
@@ -85,14 +87,17 @@ static void
nv50_query_end(struct pipe_context *pipe, struct pipe_query *pq)
{
struct nv50_context *nv50 = nv50_context(pipe);
+ struct nouveau_channel *chan = nv50->screen->nvws->channel;
+ struct nouveau_grobj *tesla = nv50->screen->tesla;
struct nv50_query *q = nv50_query(pq);
- BEGIN_RING(tesla, 0x1b00, 4);
- OUT_RELOCh(q->buffer, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RELOCl(q->buffer, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RING (0x00000000);
- OUT_RING (0x0100f002);
- FIRE_RING (NULL);
+ WAIT_RING (chan, 5);
+ BEGIN_RING(chan, tesla, 0x1b00, 4);
+ OUT_RELOCh(chan, q->buffer, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, q->buffer, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RING (chan, 0x00000000);
+ OUT_RING (chan, 0x0100f002);
+ FIRE_RING (chan);
}
static boolean