gDPPipelineMode.3p
1.87 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
.TH gDPPipelineMode 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
gDPPipelineMode, gsDPPipelineMode
\- enable/disable for span cache coherent pipeline mode.
.SH C SPECIFICATION
.nf
\f3#include "gbi.h"
gDPPipelineMode(Gfx *gdl, unsigned int mode)
gsDPPipelineMode(unsigned int mode)
\fP
.fi
.SH PARAMETERS
.TP 10
.I *gdl
graphics display list pointer.
.TP
.I mode
RDP pipeline mode.
\f3G_PM_1PRIMITIVE\fP
or
\f3G_PM_NPRIMITIVE\fP
.SH DESCRIPTION
The RDP has internal span caches to make rendering more efficient.
There are two ways to use this span cache:
.PP
\f3G_PM_1PRIMITIVE\fP selects 'cache coherent' mode.
If 2 spans in the same screen neighborhood are rendered back to back,
the second span uses the framebuffer result of the first span (which
may not have been written to the framebuffer yet) as the framebuffer
pixel source. This is important for correct read-modify-write pixel
operations where the second span result depends on the first span's
read-modify-write operation. This mode costs some pixel fill
performance.
.PP
\f3G_PM_NPRIMITIVE\fP
pipeline mode uses the span cache without coherency, but has higher
performance. You may see artifacts, typically in antialiased
rendering modes. This is because two adjacent triangles may share 2
back to back spans in the same pixel neighborhood. If the second span
does not wait until first span processing is finished, it will read
the wrong values from the framebuffer (and then write the incorrect
values back to the framebuffer).
.PP
\f3G_PM_1PRIMITIVE\fP mode can cause loss of fill rate due to the idle cycles between
primitives. In the worst case, the lost fill rate can be on the order of 1.5M
pixels/sec. Since, in real games, the visual anomalies caused by overlapping
primitives will be rare and minor, it is suggested that the
\f3G_PM_NPRIMITIVE\fP mode be used for better performance.
.SH SEE ALSO
.IR gDPSetRenderMode(3P)