#include <revolution/gx.h>
void GXInitFifoLimits(
GXFifoObj* fifo,
u32 hi_water_mark,
u32 lo_water_mark );
fifo |
A pointer to the FIFO structure |
hi_water_mark |
The byte count where the GX API halts writing commands to FIFO in 32-byte multiples. |
lo_water_mark |
The byte count where the GX API restarts writing commands to FIFO in 32-byte multiples. |
None.
This function sets the high and low watermarks for the fifo. The high and low watermarks are used in immediate-mode, i.e. when the fifo is attached to both the CPU and Graphics Processor (GP)((see GXSetCPUFifo and GXSetGPFifo).
The hardware keeps track of the number of bytes between the read and write pointers. This number represents how full the FIFO is, and when it is greater than or equal to the hi_water_mark, the hardware issues an interrupt. The GX API will suspend sending graphics to the Graphics FIFO until it has emptied to a certain point. The lo_water_mark is used to set the point where the FIFO is empty enough to resume sending graphics commands to the FIFO. Both the hi_water_mark and lo_water_mark should be in multiples of 32 bytes. The count for lo_water_mark should be less than hi_water_mark. Of course, hi_water_mark and lo_water_mark must be less than the size of the FIFO.
When the FIFO is only attached to the CPU or only attached to the GP, the high and low watermark interrupts are disabled.
Note: For safety, this will cause an assert macro to fail if fifo is already connected to the CPU or GP.
03/01/2006 Initial version.