GXSetDrawSync

C Specification

#include <revolution/gx.h>
void GXSetDrawSync( u16 token );

Arguments

token A 16-bit value for writing to the token register

Return Values

None.

Description

This function sends a token into the command stream. When the token reaches the end of the graphics pipeline (just before the frame buffer), it is written to a special token register. You can read this register using GXReadDrawSync. This allows the application to monitor the completion of graphics rendering tasks.

When the token register is set, an interrupt is also received by the CPU. You can install a callback on this interrupt with GXSetDrawSyncCallback. This will allow you to sample performance counters to profile the elapsed time between events in the graphics pipeline. Draw syncs can also be used to notify the CPU that the Graphics Processor is finished using a shared resource (a vertex array, for example).

See Also

GXReadDrawSync
GXSetDrawSyncCallback

Revision History

03/01/2006 Initial version.