GXSetDrawDone

Syntax

#include <revolution/gx.h>

void GXSetDrawDone( void )

Arguments

None.

Return Values

None.

Description

This is one of the synchronization functions. The GXSetDrawDone function will send a DrawDone command to the graphics processor's pipeline. When all previous commands have been processed and the pipeline is empty, a DrawDone status bit will be set, and an interrupt will occur. You can receive notification of this event by installing a callback on the interrupt with the GXSetDrawDoneCallback function, or you can poll the status bit with the GXWaitDrawDone function. The GXSetDrawDone function flushes the write-gather FIFO in the CPU to make sure that all commands are sent to the graphics processor.

This function normally uses multibuffer mode (see the GXSetCPUFifo function). In immediate mode, the GXDrawDone function command can be used, which both sends the command and stalls until the DrawDone status is TRUE.

Note: Once the interrupt has fired, command processing will continue. In immediate mode, this is not an issue since there should be no further commands in the FIFO. However, in multi-buffer mode, you may need to place a breakpoint after calling GXSetDrawDone to ensure that commands for subsequent frames are not executed. The GXSetDrawDone function calls the GXFlush function. Therefore, there is no need to explicitly call the GXFlush function after you have set the DrawDone command with GXSetDrawDone.

See Also

GXFlush

Revision History

2008/05/12 Mentioned that GXFlush is included.
2006/03/01 Initial version.


CONFIDENTIAL