uint32_t flags)
{
struct nouveau_channel *chan = context_chan(ctx);
- struct nouveau_pushbuf *push = chan->pushbuf;
uint32_t packet;
if (m->gr->bound == NOUVEAU_GROBJ_UNBOUND)
if (MARK_RING(chan, 2, 2))
return GL_FALSE;
- push->remaining -= 2;
packet = (m->gr->subc << 13) | (1 << 18) | m->mthd;
if (flags) {
- if (nouveau_pushbuf_emit_reloc(chan, push->cur++, m->bo,
+ if (nouveau_pushbuf_emit_reloc(chan, chan->cur++, m->bo,
packet, 0, flags |
(m->flags & (NOUVEAU_BO_VRAM |
NOUVEAU_BO_GART |
0, 0))
goto fail;
} else {
- *(push->cur++) = packet;
+ *(chan->cur++) = packet;
}
- if (nouveau_pushbuf_emit_reloc(chan, push->cur++, m->bo, m->data,
+ if (nouveau_pushbuf_emit_reloc(chan, chan->cur++, m->bo, m->data,
m->data2, flags | m->flags,
m->vor, m->tor))
goto fail;
swtnl_bind_vertices(ctx);
while (count) {
- push = get_max_vertices(ctx, NULL, chan->pushbuf->remaining);
+ push = get_max_vertices(ctx, NULL, AVAIL_RING(chan));
push = MIN2(push / 12 * 12, count);
count -= push;
min_index, max_index);
}
- if (count > get_max_vertices(ctx, ib, chan->pushbuf->remaining))
+ if (count > get_max_vertices(ctx, ib, AVAIL_RING(chan)))
WAIT_RING(chan, PUSHBUF_DWORDS);
BATCH_BEGIN(nvgl_primitive(prims[i].mode));
end = start + prims[i].count;
if (prims[i].count > get_max_vertices(ctx, ib,
- chan->pushbuf->remaining))
+ AVAIL_RING(chan)))
WAIT_RING(chan, PUSHBUF_DWORDS);
BATCH_BEGIN(nvgl_primitive(prims[i].mode));