summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-03-19 00:06:15 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-03-19 22:50:42 +1100
commit9575e35807c89c0b8a745671bc2dcd54d96379ff (patch)
treed05c56b1807634eb81d8d5f1c5ed4f0c41b8d492 /src/gallium/drivers/nouveau
parent75e714d476eb573a6e06585341ce693434eb237e (diff)
nouveau: pass nvws to nvws->push_* functions, rather than nouveau_channel*
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_push.h7
-rw-r--r--src/gallium/drivers/nouveau/nouveau_stateobj.h10
-rw-r--r--src/gallium/drivers/nouveau/nouveau_winsys.h4
3 files changed, 10 insertions, 11 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_push.h b/src/gallium/drivers/nouveau/nouveau_push.h
index c5c5d988d5..225c17744a 100644
--- a/src/gallium/drivers/nouveau/nouveau_push.h
+++ b/src/gallium/drivers/nouveau/nouveau_push.h
@@ -27,7 +27,7 @@
#define BEGIN_RING(obj,mthd,size) do { \
NOUVEAU_PUSH_CONTEXT(pc); \
if (pc->nvws->channel->pushbuf->remaining < ((size) + 1)) \
- pc->nvws->push_flush(pc->nvws->channel, ((size) + 1)); \
+ pc->nvws->push_flush(pc->nvws, ((size) + 1)); \
OUT_RING((pc->obj->subc << 13) | ((size) << 18) | (mthd)); \
pc->nvws->channel->pushbuf->remaining -= ((size) + 1); \
} while(0)
@@ -38,13 +38,12 @@
#define FIRE_RING() do { \
NOUVEAU_PUSH_CONTEXT(pc); \
- pc->nvws->push_flush(pc->nvws->channel, 0); \
+ pc->nvws->push_flush(pc->nvws, 0); \
} while(0)
#define OUT_RELOC(bo,data,flags,vor,tor) do { \
NOUVEAU_PUSH_CONTEXT(pc); \
- pc->nvws->push_reloc(pc->nvws->channel, \
- pc->nvws->channel->pushbuf->cur++, \
+ pc->nvws->push_reloc(pc->nvws, pc->nvws->channel->pushbuf->cur++, \
(bo), (data), (flags), (vor), (tor)); \
} while(0)
diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h
index 439c7e4734..d465223748 100644
--- a/src/gallium/drivers/nouveau/nouveau_stateobj.h
+++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h
@@ -99,14 +99,14 @@ so_emit(struct nouveau_winsys *nvws, struct nouveau_stateobj *so)
nr = so->cur - so->push;
if (pb->remaining < nr)
- nvws->push_flush(nvws->channel, nr);
+ nvws->push_flush(nvws, nr);
pb->remaining -= nr;
memcpy(pb->cur, so->push, nr * 4);
for (i = 0; i < so->cur_reloc; i++) {
struct nouveau_stateobj_reloc *r = &so->reloc[i];
- nvws->push_reloc(nvws->channel, pb->cur + r->offset, r->bo,
+ nvws->push_reloc(nvws, pb->cur + r->offset, r->bo,
r->data, r->flags, r->vor, r->tor);
}
pb->cur += nr;
@@ -120,17 +120,17 @@ so_emit_reloc_markers(struct nouveau_winsys *nvws, struct nouveau_stateobj *so)
i = so->cur_reloc << 1;
if (nvws->channel->pushbuf->remaining < i)
- nvws->push_flush(nvws->channel, i);
+ nvws->push_flush(nvws, i);
nvws->channel->pushbuf->remaining -= i;
for (i = 0; i < so->cur_reloc; i++) {
struct nouveau_stateobj_reloc *r = &so->reloc[i];
- nvws->push_reloc(nvws->channel, pb->cur++, r->bo, r->packet,
+ nvws->push_reloc(nvws, pb->cur++, r->bo, r->packet,
(r->flags &
(NOUVEAU_BO_VRAM | NOUVEAU_BO_GART)) |
NOUVEAU_BO_DUMMY, 0, 0);
- nvws->push_reloc(nvws->channel, pb->cur++, r->bo, r->data,
+ nvws->push_reloc(nvws, pb->cur++, r->bo, r->data,
r->flags | NOUVEAU_BO_DUMMY, r->vor, r->tor);
}
}
diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index e4b20478a0..7fa7cc0910 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -24,10 +24,10 @@ struct nouveau_winsys {
struct nouveau_resource **);
void (*res_free)(struct nouveau_resource **);
- int (*push_reloc)(struct nouveau_channel *, void *ptr,
+ int (*push_reloc)(struct nouveau_winsys *, void *ptr,
struct pipe_buffer *, uint32_t data,
uint32_t flags, uint32_t vor, uint32_t tor);
- int (*push_flush)(struct nouveau_channel *, unsigned size);
+ int (*push_flush)(struct nouveau_winsys *, unsigned size);
int (*grobj_alloc)(struct nouveau_winsys *, int grclass,
struct nouveau_grobj **);