Function


nuDebTaskPerfBar1
nuDebTaskPerfBar1EX2


Syntax

void nuDebTaskPerfBar1(u32 frameNum, u32 y, u32 flag)
void nuDebTaskPerfBar1EX2(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 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 1)

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 the screen.

y is the upper-left Y coordinate of the display frame for 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 1 displays the total time of RSP and RDP processing of audio tasks and graphics tasks while drawing the frame buffer.

         frame -1      frame 1       frame 2       frame 3
	 -------------------------------------------------------
(1) RSP	|=====        |             |             |             |
(2) RSP	|=============|=============|=============|==           |
(3) RDP	|=============|=============|=========    |             |
(4) CMD	|=============|=============|=========    |             |
(5) PIPE|=============|=============|=========    |             |
(6) TMEM|=============|=============|=========    |             |
	 -------------------------------------------------------
(1) RSP's time processing audio task (black)
(2) RSP's time processing graphics task (yellow) (includes yield time)
(3) RDP's time drawing graphics (green)
(4) CMD counter value of RDP's internal counter
This is the process execution time. Unlike (3) it does not include the time waiting for commands from the RSP. When this bar is shorter than bar (3) it means that time is being spent waiting for commands from the RDP.
(5) RDP's PIPE counter value
(6) RDP's TMEM counter value
This value represents the time required for loading to texture memory. The performance is better if this value is small.

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

This performance meter is set up to help you grasp the processing time by the RSP and RDP. It can be used to make adjustments, for example when you want to cut back to a limited number of frames.

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, nuDebTaskPerfBar1EX2 is usually used. If F3DEX microcode is used, define F3DEX_GBI before nusys.h.

See Also

nuGfxTaskStart, nuGfxInit, nuGfxSetUcode, nuDebTaskPerfBar0, 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.