#define CP_PACKET0(register, count) \
(RADEON_CP_PACKET0 | ((count) << 16) | ((register) >> 2))
-#define CP_PACKET3(op, count) \
- (RADEON_CP_PACKET3 | (op) | ((count) << 16))
-
#define CS_LOCALS(context) \
struct r300_winsys* cs_winsys = context->winsys; \
struct radeon_cs* cs = cs_winsys->cs; \
OUT_CS(CP_PACKET0(register, ((count) - 1)) | RADEON_ONE_REG_WR); \
} while (0)
+/* XXX might no longer be needed */
#define R300_PACIFY do { \
OUT_CS_REG(RADEON_WAIT_UNTIL, (1 << 14) | (1 << 15) | (1 << 16) | (1 << 17) | \
(1 << 18)); \
} while (0)
+/* XXX do we still use this? */
#define R300_SCREENDOOR do { \
OUT_CS_REG(R300_SC_SCREENDOOR, 0x0); \
R300_PACIFY; \
OUT_CS_REG(R300_SC_SCREENDOOR, 0xffffff); \
} while (0)
+#define CP_PACKET3(op, count) \
+ (RADEON_CP_PACKET3 | (op) | ((count) << 16))
+
+#define R300_CS_PKT3(op, count) do { \
+ OUT_CS(CP_PACKET3(op, count)); \
+} while (0)
+
#endif /* R300_CS_H */
((h * 6) & R300_POINTSIZE_Y_MASK) |
((w * 6) << R300_POINTSIZE_X_SHIFT));
- /* XXX Packet3 */
- OUT_CS(CP_PACKET3(R200_3D_DRAW_IMMD_2, 8));
+ /* Packet3 with our point vertex */
+ OUT_CS_PKT3(R200_3D_DRAW_IMMD_2, 8);
OUT_CS(R300_PRIM_TYPE_POINT | R300_PRIM_WALK_RING |
(1 << R300_PRIM_NUM_VERTICES_SHIFT));
OUT_CS_32F(w / 2.0);
* VBPNTR [relocated BO]
*/
BEGIN_CS(7);
- OUT_CS(CP_PACKET3(R300_PACKET3_3D_LOAD_VBPNTR, 3));
+ OUT_CS_PKT3(R300_PACKET3_3D_LOAD_VBPNTR, 3);
OUT_CS(1);
OUT_CS(r300->vertex_info.vinfo.size |
(r300->vertex_info.vinfo.size << 8));
debug_printf("r300: Doing vbuf render, count %d\n", count);
BEGIN_CS(2);
- OUT_CS(CP_PACKET3(R300_PACKET3_3D_DRAW_VBUF_2, 0));
+ OUT_CS_PKT3(R300_PACKET3_3D_DRAW_VBUF_2, 0);
OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_VERTEX_LIST | (count << 16) |
r300render->hwprim);
END_CS;
debug_printf("r300: Doing indexbuf render, count %d\n", count);
BEGIN_CS(5);
- OUT_CS(CP_PACKET3(R300_PACKET3_3D_DRAW_INDX_2, 0));
+ OUT_CS_PKT3(R300_PACKET3_3D_DRAW_INDX_2, 0);
OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) |
r300render->hwprim | R300_VAP_VF_CNTL__INDEX_SIZE_32bit);
- OUT_CS(CP_PACKET3(R300_PACKET3_INDX_BUFFER, 2));
+ OUT_CS_PKT3(R300_PACKET3_INDX_BUFFER, 2);
OUT_CS(R300_INDX_BUFFER_ONE_REG_WR | (R300_VAP_PORT_IDX0 >> 2));
OUT_CS_RELOC(index_buffer, 0, RADEON_GEM_DOMAIN_GTT, 0, 0);
END_CS;