osDpGetCounters.3p
1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.TH osDpGetCounters 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
osDpGetCounters \-
Get internal performance counters from the display processor (DP)
.SH SYNOPSIS
.nf
\f3
.Op c
#include <ultra64.h>
.sp .8v
void osDpGetCounters(u32 *array);
.Op
\f1
.fi
.SH DESCRIPTION
This routine returns the values of four internal DP counters.
The
.I array
parameter must point to a buffer that is large enough to hold
four 32 bit values.
The first element of the array is the
.I CLOCK
counter.
This counter is incremented by the free running RCP clock.
For NTSC systems,
this counter increments at 60.85 Mhz and each counter
tick represents approximately 16.43 nanoseconds.
For PAL systems,
this counter increments at 62.07 Mhz and each counter
tick represents approximately 16.11 nanoseconds.
The second element is the
.I CMD
counter.
This counter is incremented once every clock cycle when the RDP has work
to do.
The RSP places RDP commands in a fifo for execution.
If this fifo is not empty, the counter is incremented.
The third element is the
.I PIPE
counter.
This counter is incremented when the internal RDP pipeline is not stalled while
waiting for memory accesses to occur.
The last element is the
.I TMEM
counter.
This counter is incremented when the texture memory is being loaded.
.PP
The counters can be individually cleared using the
.I osDpSetStatus
command, with
.I DPC_CLR_TMEM_CTR, DPC_CLR_PIPE_CTR, DPC_CLR_CMD_CTR
, and
.I DPC_CLR_CLOCK_CTR
status bits.
.SH SEE ALSO
.IR osDpSetStatus (3P)