#ifdef DEBUG
#define BEGIN_CS(size) do { \
- assert(size <= (RADEON_MAX_CMDBUF_DWORDS - cs_copy->cdw)); \
+ assert(size <= (cs_copy->current.max_dw - cs_copy->current.cdw)); \
cs_count = size; \
} while (0)
*/
#define OUT_CS(value) do { \
- cs_copy->buf[cs_copy->cdw++] = (value); \
+ cs_copy->current.buf[cs_copy->current.cdw++] = (value); \
CS_USED_DW(1); \
} while (0)
OUT_CS(CP_PACKET3(op, count))
#define OUT_CS_TABLE(values, count) do { \
- memcpy(cs_copy->buf + cs_copy->cdw, (values), (count) * 4); \
- cs_copy->cdw += (count); \
+ memcpy(cs_copy->current.buf + cs_copy->current.cdw, (values), (count) * 4); \
+ cs_copy->current.cdw += (count); \
CS_USED_DW(count); \
} while (0)
/**
- * Writing relocations.
+ * Writing buffers.
*/
#define OUT_CS_RELOC(r) do { \
assert((r)); \
- assert((r)->cs_buf); \
+ assert((r)->buf); \
OUT_CS(0xc0001000); /* PKT3_NOP */ \
- OUT_CS(cs_winsys->cs_get_reloc(cs_copy, (r)->cs_buf) * 4); \
- CS_USED_DW(2); \
+ OUT_CS(cs_winsys->cs_lookup_buffer(cs_copy, (r)->buf) * 4); \
} while (0)
#define WRITE_CS_TABLE(values, count) do { \
assert(cs_count == 0); \
- memcpy(cs_copy->buf + cs_copy->cdw, (values), (count) * 4); \
- cs_copy->cdw += (count); \
+ memcpy(cs_copy->current.buf + cs_copy->current.cdw, (values), (count) * 4); \
+ cs_copy->current.cdw += (count); \
} while (0)
#endif /* R300_CS_H */