diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-02-12 15:34:33 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-02-12 16:03:20 +1000 |
commit | ba3c874f08b6388a12e2f659d87cf0fb72f41e92 (patch) | |
tree | d5303f4aa10b02923319bca3c164105d3f398e98 /src/gallium/drivers/nv40/nv40_draw.c | |
parent | 6af75a0ff47acfe1e51c93637045affb770f00ab (diff) |
nouveau: use AVAIL_RING()
Diffstat (limited to 'src/gallium/drivers/nv40/nv40_draw.c')
-rw-r--r-- | src/gallium/drivers/nv40/nv40_draw.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv40/nv40_draw.c b/src/gallium/drivers/nv40/nv40_draw.c index 60ab49fad1..48bd84d16c 100644 --- a/src/gallium/drivers/nv40/nv40_draw.c +++ b/src/gallium/drivers/nv40/nv40_draw.c @@ -88,12 +88,11 @@ nv40_render_prim(struct draw_stage *stage, struct prim_header *prim, struct nv40_screen *screen = nv40->screen; struct nouveau_channel *chan = screen->base.channel; - struct nouveau_pushbuf *pb = chan->pushbuf; struct nouveau_grobj *curie = screen->curie; unsigned i; /* Ensure there's room for 4xfloat32 + potentially 3 begin/end */ - if (pb->remaining < ((count * 20) + 6)) { + if (AVAIL_RING(chan) < ((count * 20) + 6)) { if (rs->prim != NV40TCL_BEGIN_END_STOP) { NOUVEAU_ERR("AIII, missed flush\n"); assert(0); @@ -121,7 +120,7 @@ nv40_render_prim(struct draw_stage *stage, struct prim_header *prim, /* If it's likely we'll need to empty the push buffer soon, finish * off the primitive now. */ - if (pb->remaining < ((count * 20) + 6)) { + if (AVAIL_RING(chan) < ((count * 20) + 6)) { BEGIN_RING(chan, curie, NV40TCL_BEGIN_END, 1); OUT_RING (chan, NV40TCL_BEGIN_END_STOP); rs->prim = NV40TCL_BEGIN_END_STOP; |