diff options
author | Vladimir Dergachev <[email protected]> | 2005-01-01 18:41:43 +0000 |
---|---|---|
committer | Vladimir Dergachev <[email protected]> | 2005-01-01 18:41:43 +0000 |
commit | 404d925b58b8fa0322ba79e7dfb14132ac57ae56 (patch) | |
tree | 46de7a80568b2c33cd1dca448427e10ab9ff1519 | |
parent | e443d1ec470b252e694a15d782b1386122b4f085 (diff) |
Add a convenience function to issue CP delays.
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_emit.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_emit.h b/src/mesa/drivers/dri/r300/r300_emit.h index cd49602fc5d..e0c77373ad4 100644 --- a/src/mesa/drivers/dri/r300/r300_emit.h +++ b/src/mesa/drivers/dri/r300/r300_emit.h @@ -96,6 +96,16 @@ static __inline__ uint32_t cmdpacket3(int packet) return cmd.u; } +static __inline__ uint32_t cmdcpdelay(unsigned short count) +{ + drm_r300_cmd_header_t cmd; + + cmd.delay.cmd_type = R300_CMD_CP_DELAY; + cmd.delay.count = count; + + return cmd.u; +} + /* Prepare to write a register value to register at address reg. If num_extra > 0 then the following extra values are written to registers with address +4, +8 and so on.. */ @@ -181,4 +191,15 @@ cmd=(drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa, \ cmd[0].header.cmd_type=R300_CMD_END3D; } +void static inline cp_delay(PREFIX unsigned short count) +{ +LOCAL_VARS + +cmd=(drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa, \ + 0, \ + __FUNCTION__); \ + +cmd[0].i=cmdcpdelay(count); +} + #endif |