Lines Matching refs:cmdbuf
68 drm_radeon_kcmd_buffer_t *cmdbuf, int n)
75 nr = cmdbuf->nbox - n;
87 (&box, &cmdbuf->boxes[n + i], sizeof (box))) {
131 * Now since the cmdbuf interface is so chaotic right now (and
264 drm_radeon_kcmd_buffer_t *cmdbuf, drm_r300_cmd_header_t header)
281 values[i] = ((int *)(uintptr_t)cmdbuf->buf)[i];
304 cmdbuf->buf += sz * 4;
305 cmdbuf->bufsz -= sz * 4;
317 drm_radeon_kcmd_buffer_t *cmdbuf,
330 if (sz * 4 > cmdbuf->bufsz)
342 cmdbuf, header));
351 OUT_RING_TABLE(cmdbuf->buf, sz);
354 cmdbuf->buf += sz * 4;
355 cmdbuf->bufsz -= sz * 4;
366 drm_radeon_kcmd_buffer_t *cmdbuf, drm_r300_cmd_header_t header)
377 if (sz * 16 > cmdbuf->bufsz)
389 OUT_RING_TABLE(cmdbuf->buf, sz * 4);
393 cmdbuf->buf += sz * 16;
394 cmdbuf->bufsz -= sz * 16;
404 drm_radeon_kcmd_buffer_t *cmdbuf)
408 if (8 * 4 > cmdbuf->bufsz)
415 OUT_RING_TABLE(cmdbuf->buf, 8);
418 cmdbuf->buf += 8 * 4;
419 cmdbuf->bufsz -= 8 * 4;
425 drm_radeon_kcmd_buffer_t *cmdbuf, u32 header)
441 (void) memcpy(payload, cmdbuf->buf + 4, (count + 1) * 4);
485 cmdbuf->buf += (count + 2) * 4;
486 cmdbuf->bufsz -= (count + 2) * 4;
492 drm_radeon_kcmd_buffer_t *cmdbuf)
494 u32 *cmd = (u32 *)(uintptr_t)cmdbuf->buf;
529 OUT_RING_TABLE((cmdbuf->buf + 4), count + 1);
532 cmdbuf->buf += (count+2)*4;
533 cmdbuf->bufsz -= (count+2)*4;
540 drm_radeon_kcmd_buffer_t *cmdbuf)
542 u32 *cmd = (u32 *)(uintptr_t)cmdbuf->buf;
560 OUT_RING_TABLE(cmdbuf->buf + 4, count + 1);
563 cmdbuf->buf += (count+2)*4;
564 cmdbuf->bufsz -= (count+2)*4;
571 drm_radeon_kcmd_buffer_t *cmdbuf)
577 if (4 > cmdbuf->bufsz)
586 header = *(u32 *)(uintptr_t)cmdbuf->buf;
597 if ((count + 2) * 4 > cmdbuf->bufsz) {
599 "%d bytes left\n", (count + 2) * 4, cmdbuf->bufsz);
606 return (r300_emit_3d_load_vbpntr(dev_priv, cmdbuf, header));
609 return (r300_emit_bitblt_multi(dev_priv, cmdbuf));
614 return (r300_emit_indx_buffer(dev_priv, cmdbuf));
633 OUT_RING_TABLE((cmdbuf->buf + 4), count + 1);
636 cmdbuf->buf += (count + 2) * 4;
637 cmdbuf->bufsz -= (count + 2) * 4;
647 drm_radeon_kcmd_buffer_t *cmdbuf, drm_r300_cmd_header_t header)
651 char *orig_buf = cmdbuf->buf;
652 int orig_bufsz = cmdbuf->bufsz;
656 * even if cmdbuf->nbox is 0. Compare r300_emit_cliprects for rationale.
660 if (cmdbuf->nbox > R300_SIMULTANEOUS_CLIPRECTS) {
661 ret = r300_emit_cliprects(dev_priv, cmdbuf, n);
665 cmdbuf->buf = orig_buf;
666 cmdbuf->bufsz = orig_bufsz;
672 ret = r300_emit_clear(dev_priv, cmdbuf);
681 ret = r300_emit_raw_packet3(dev_priv, cmdbuf);
691 (void *)(cmdbuf->buf - sizeof (header)));
696 } while (n < cmdbuf->nbox);
746 drm_radeon_kcmd_buffer_t *cmdbuf,
753 if (cmdbuf->bufsz < sizeof (uint64_t) +
764 ref_age_base = (u32 *)(uintptr_t)*((uint64_t *)(uintptr_t)cmdbuf->buf);
766 cmdbuf->buf += sizeof (uint64_t);
767 cmdbuf->bufsz -= sizeof (uint64_t);
770 buf_idx = *(u32 *)(uintptr_t)cmdbuf->buf;
795 cmdbuf->buf += sizeof (buf_idx);
796 cmdbuf->bufsz -= sizeof (buf_idx);
815 drm_file_t *fpriv, drm_radeon_kcmd_buffer_t *cmdbuf)
831 if (cmdbuf->nbox <= R300_SIMULTANEOUS_CLIPRECTS) {
832 ret = r300_emit_cliprects(dev_priv, cmdbuf, 0);
837 while (cmdbuf->bufsz >= sizeof (drm_r300_cmd_header_t)) {
841 header.u = *(unsigned int *)(uintptr_t)cmdbuf->buf;
843 cmdbuf->buf += sizeof (header);
844 cmdbuf->bufsz -= sizeof (header);
849 ret = r300_emit_packet0(dev_priv, cmdbuf, header);
858 ret = r300_emit_vpu(dev_priv, cmdbuf, header);
867 ret = r300_emit_packet3(dev_priv, cmdbuf, header);
951 ret = r300_scratch(dev_priv, cmdbuf, header);
961 (void *)(cmdbuf->buf - sizeof (header)));