summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv40
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-02-12 15:34:33 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-02-12 16:03:20 +1000
commitba3c874f08b6388a12e2f659d87cf0fb72f41e92 (patch)
treed5303f4aa10b02923319bca3c164105d3f398e98 /src/gallium/drivers/nv40
parent6af75a0ff47acfe1e51c93637045affb770f00ab (diff)
nouveau: use AVAIL_RING()
Diffstat (limited to 'src/gallium/drivers/nv40')
-rw-r--r--src/gallium/drivers/nv40/nv40_draw.c5
-rw-r--r--src/gallium/drivers/nv40/nv40_vbo.c10
2 files changed, 7 insertions, 8 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;
diff --git a/src/gallium/drivers/nv40/nv40_vbo.c b/src/gallium/drivers/nv40/nv40_vbo.c
index 1e14edc56a..f2048eb869 100644
--- a/src/gallium/drivers/nv40/nv40_vbo.c
+++ b/src/gallium/drivers/nv40/nv40_vbo.c
@@ -186,7 +186,7 @@ nv40_draw_arrays(struct pipe_context *pipe,
nv40_state_emit(nv40);
- vc = nouveau_vbuf_split(chan->pushbuf->remaining, 6, 256,
+ vc = nouveau_vbuf_split(AVAIL_RING(chan), 6, 256,
mode, start, count, &restart);
if (!vc) {
FIRE_RING(chan);
@@ -240,7 +240,7 @@ nv40_draw_elements_u08(struct nv40_context *nv40, void *ib,
nv40_state_emit(nv40);
- vc = nouveau_vbuf_split(chan->pushbuf->remaining, 6, 2,
+ vc = nouveau_vbuf_split(AVAIL_RING(chan), 6, 2,
mode, start, count, &restart);
if (vc == 0) {
FIRE_RING(chan);
@@ -291,7 +291,7 @@ nv40_draw_elements_u16(struct nv40_context *nv40, void *ib,
nv40_state_emit(nv40);
- vc = nouveau_vbuf_split(chan->pushbuf->remaining, 6, 2,
+ vc = nouveau_vbuf_split(AVAIL_RING(chan), 6, 2,
mode, start, count, &restart);
if (vc == 0) {
FIRE_RING(chan);
@@ -342,7 +342,7 @@ nv40_draw_elements_u32(struct nv40_context *nv40, void *ib,
nv40_state_emit(nv40);
- vc = nouveau_vbuf_split(chan->pushbuf->remaining, 5, 1,
+ vc = nouveau_vbuf_split(AVAIL_RING(chan), 5, 1,
mode, start, count, &restart);
if (vc == 0) {
FIRE_RING(chan);
@@ -418,7 +418,7 @@ nv40_draw_elements_vbo(struct pipe_context *pipe,
nv40_state_emit(nv40);
- vc = nouveau_vbuf_split(chan->pushbuf->remaining, 6, 256,
+ vc = nouveau_vbuf_split(AVAIL_RING(chan), 6, 256,
mode, start, count, &restart);
if (!vc) {
FIRE_RING(chan);