Function


nuDebTaskPerfBar0
nuDebTaskPerfBar0EX2


Syntax

void nuDebTaskPerfBar0(u32 frameNum, u32 y, u32 flag)
void nuDebTaskPerfBar0EX2(u32 frameNum, u32 y, u32 flag)

Arguments

frameNum      number of frames to display (1-6)
y Y coordinate of display position (0-240)
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

Description

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.

Intervals of measuring performance can be changed by the nuDebTaskPerfIntervalSet function. In this case, performance is measured by intervals of specifying NU_SC_SWAPBUFFER. In frames between measuring intervals, the performance measured previously will be displayed, as is.

"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.

The processing location of the application program can be displayed by a mark for the performance meter. The nuDebPerfMarkSet function is used to display the mark of the processing location. Up to ten marks can be displayed.

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.

Beginning with Version 2.06, F3DEX_GBI_2 is defined by nusys.h. Therefore, nuDebTaskPerfBar0EX2 is usually used. If F3DEX microcode is used, define F3DEX_GBI before nusys.h.

See Also

nuGfxTaskStart, nuGfxInit, nuGfxSetUcode, nuDebTaskPerfBar1, nuDebTaskPerfIntervalSet, and nuDebPerfMarkSet


Revision History

6/15/99 Added explanation of setting performance measuring interval. Added text regarding nuDebPerfMarkSet function.
8/4/99 Deleted description of Ver1.2 and added description of Ver2.06.