Function
nuDebTaskPerfBar0 nuDebTaskPerfBar0EX2
void nuDebTaskPerfBar0(u32 frameNum, u32 y, u32 flag) void nuDebTaskPerfBar0EX2(u32 frameNum, u32 y, u32 flag)
Arguments
flag determines whether or not to swap the frame buffer when a task completed
NU_SC_SWAPBUFFER Swap frame buffer
NU_SC_NOSWAPBUFFER Do not swap frame buffer
Return Value
None
Explanation
Displays the performance meter (Type 0).
Displays the performance meter for the graphics task as well as for the audio task. This function internally sets the RDP and creates a display list, then starts the graphics task.
"frameNum" is the number of frames to display on screen.
"y" is the upper-left Y coordinate of the display frame of the performance meter. This is specified using the screen coordinate system.
"flag" is the frame buffer swap flag passed to the argument of the nuGfxTaskStart function.
Type 0 display enables you to grasp the between-frame timing of starts and stops of the RSP and RDP in audio and graphics tasks.
frame -1 frame 1 frame 2 frame 3 ------------------------------------------------------- (1) RSP | | === | === | == | (2) RSP | | ==== ===|========= | | (3) RDP | | ========|=============|========= | -------------------------------------------------------
The above diagram shows the times when (1) the RSP is processing an audio task (black), (2) the RSP is processing a graphics task (yellow), and (3) the RDP is drawing graphics (green). The middle part (2) includes Yield time. The task is measured by calculating the time between the end of the task specified by NU_SC_SWAPBUFFER when the graphics task is started up, and the end of the next task specified by NU_SC_SWAPBUFFER.
"frame -1" is calculated if drawing for the frame buffer is started before the arrival of the next retrace. In the above diagram, the third frame will become frame -1 in the next performance meter display.
This performance meter was set up so you can learn when the RDP has free time. You can boost performance by executing graphics tasks such that the RDP is continually operating.
This function can only be used with the debug library. Also, please note that when the nuGfxInit function is not used, then the 0th microcode in the microcode structure array defined by the nuGfxSetUcode function is used.
nuDebTaskPerfBar0EX2(), supporting F3DEX2 was added from Ver 1.2. It is used when F3DEX_GBI_2 is declared with #define.
See Also
nuGfxTaskStart
nuGfxInit
nuGfxSetUcode
nuDebTaskPerfBar1